albertlee Posted February 20, 2005 Posted February 20, 2005 I have trouble in understanding the difference between HTML, XHTML, and XML I think more possibly is because of my poor computer knowledge, so can any one explain the difference in detail in a plainer way??? thx Albert
Sayonara Posted February 21, 2005 Posted February 21, 2005 HTML is a markup for describing the presentation of (any) page content in a hypermedia environment. XML is the next generation of markup, which structurally describes data in a hypermedia environment. XHTML is a reworked version of HTML, which aims to offer a slight taste of the functionality and syntax of XML while preparing web authors for the eventual migration away from HTML and towards XML. It's a transitory markup language that encourages well-formed documents, semantic code, and separation of the content / style / behaviour layers.
Cadmus Posted February 21, 2005 Posted February 21, 2005 I have trouble in understanding the difference between HTML, XHTML, and XML A mark language, also called a tag language, is a method of marking text so that a parser can understand some meaning to the text in the context of the tag. XML is a very powerful meta markup language. XML provides a method whereby anybody, any company, or any industry can create its own markup language, complete with optional rules of "grammar", for sharing and giving meaning to data within the group. HTML is a specific markup language, with a specific and clearly defined set of tags, which is primarily used for pages to be passed over the web. Note that HTML is not a subset of XML. HTML tags are not used to provide meaning to text, but instead are used as a guide by the parser as to how to display the text.
mossoi Posted February 21, 2005 Posted February 21, 2005 If you're looking to use one of them to build a web site I would start with XHTML Transitional and then investigate XML.
Rekkr Posted February 21, 2005 Posted February 21, 2005 I think XHTML Transitional is good for XHTML beginners, but really you should use XHTML Strict.
Sayonara Posted February 21, 2005 Posted February 21, 2005 To be honest, you really need to read the W3C web site. If you want to eventually use XML you aren't going to be able to muddle through by asking questions on a science forum.
Sayonara Posted February 21, 2005 Posted February 21, 2005 XHTML is preferable for general pages, but it largely depends on what it is you want to do.
albertlee Posted February 21, 2005 Author Posted February 21, 2005 thx for the explanation, I now know the difference between XML and HTML, but I am abit confused on the general difference between XHTML and HTML, so, probably can any one give an example of using XHTML which has a more significant advantage than using HTML??? thx Albert
mossoi Posted February 21, 2005 Posted February 21, 2005 XHTML is less forgiving than HTML. There's not a huge amount of difference between the two when you actually use them to build a page but some things that you can use in HTML aren't allowed in XHTML. It's best use XHTML and validate your source code. That way you can be sure that you've written it in such a way that it can be considered as well formed. Have a look at this: http://webdesign.about.com/cs/xhtmlxml/a/aa013100a.htm
Cadmus Posted February 22, 2005 Posted February 22, 2005 I am abit confused on the general difference between XHTML and HTML, XHTML is a reformulation of HTML 4 as an XML 1.0 application. HTML is designed to encourage sloppy design. XML is designed to encourage good design. For example, in html the following would not be an error: <p><center><b>blah blah</center></B> In XML, this would not be allowed, because the <b></B> tags mismatch case, there is an embedding discrepancy between the <center> and <b> tags, and there is no end tag to <p>. XHTML is an attempt, I believe, to encourage better page design by enforcing the types of rules that XML requires, rather than allowing the sloppiness that HTML allows. For an analogy, consider Windows and Unix operating systems. Windows assumes that users are idiots, whereas Unix assumes that users are experts. In the same way, HTML is designed to be extremely forgiving, and the parser will take a guess at what the designer intends, which increases the likelieness that the page will not perform exactly as desired. XML reduces the guesswork by enforcing better design practice.
albertlee Posted February 22, 2005 Author Posted February 22, 2005 thx so much but we all know that html file ends with *.html how about xhtml??? Albert
mossoi Posted February 23, 2005 Posted February 23, 2005 XHTML uses the same extensions as HTML (asp, php, htm, html, etc.). It's a good idea to declare the doctype for each page though (you've gotta do it if you want it to validate properly). This is what I use on my site which is XHTML Strict: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
albertlee Posted February 23, 2005 Author Posted February 23, 2005 thx so much for the explanation!!!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now