...

View Full Version : Dumb question: what's the difference between Xhtml 1.0 and html 4.01?



<?austin ?>
10-17-2006, 02:47 AM
i have worked with both langauges profusly, i know each real well...but i never asked this...whats the difference besides pickyness over lowercase letters and indenting? lol stupid question...i know.

_Aerospace_Eng_
10-17-2006, 04:36 AM
Not a stupid question but there are tons of resources out there that can be found with both a simple web search (google) and a forum search. Your question gets asked often, it just takes a little initiative for the user to do some research on their own, key word 'search'. It can't really be explained in one post. There are a lot of things to talk about.

<?austin ?>
10-18-2006, 01:30 AM
oh, well i did my reasearch before i posted and i got a pretty general explaination...what i want to know is what the advantages are to using it.

_Aerospace_Eng_
10-18-2006, 02:13 AM
It depends where its being used. A lot of times web designers say that if you can code in XHTML then you are in with the standards. This can be true however IE6 doesn't fully support true XHTML. It sees everything as HTML. Unless you are passing the correct XML headers then you are just sending text/html not text/xhtml.

felgall
10-18-2006, 06:06 AM
Just as one example of why you might choose XHTML rather than HTML.

The XHTML standards don't allow you to leave out closing tags the way that the HTML standards sometimes allows. Since leaving out a tag means that the browser has to determine where the missing tag needs to be inserted a page with missing tags loads slower than one where they are all defined even though the extra tags makes the code to be downloaded slightly larger and hence slower to download but much faster to render after downloading(assuming you are using something faster than a 300baud acoustic modem where the speed saving on the download would be more significant). Using XHTML allows you to validate that you didn't leave out a tag that will slow the displaying of your page and lose you some visitors. The HTML validator wont flag the missing tags as errors as it allows for the browser adding them for you.

gsnedders
10-18-2006, 12:56 PM
Unless you are passing the correct XML headers then you are just sending text/html not text/xhtml.

Not such MIME type. text/html, text/xml, application/xml and application/xhtml+xml are the valid MIME types for XHTML.

zcorpan
10-24-2006, 09:07 PM
[...] Since leaving out a tag means that the browser has to determine where the missing tag needs to be inserted a page with missing tags loads slower than one where they are all defined even though the extra tags makes the code to be downloaded slightly larger and hence slower to download but much faster to render after downloading(assuming you are using something faster than a 300baud acoustic modem where the speed saving on the download would be more significant). [...]Why would a page with optional end tags be faster to parse (with the HTML parser) than a page without optional end tags (with the HTML parser)? That doens't make any sense. The input stream is longer if you include optional tags. The processing is basically the same (e.g., when you hit <p> while inside a paragraph you pop the current paragraph and create a new one; when you hit </p><p> while inside a paragraph you pop the current paragraph then you create a new one).

Unless you have real tests which confirm any difference in processing in browsers I don't buy your claims. However, even if it was true, the network is almost always slower than the HTML parser, which is why gzip is benefitical for HTML over HTTP, for instance (even though it means more processing).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum