Go Back   CodingForums.com > :: Client side development > XML

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-17-2006, 02:47 AM   PM User | #1
<?austin ?>
Registered User

 
Join Date: Oct 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
<?austin ?> can only hope to improve
Dumb question: what's the difference between Xhtml 1.0 and html 4.01?

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.
<?austin ?> is offline   Reply With Quote
Old 10-17-2006, 04:36 AM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 10-18-2006, 01:30 AM   PM User | #3
<?austin ?>
Registered User

 
Join Date: Oct 2006
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
<?austin ?> can only hope to improve
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.
<?austin ?> is offline   Reply With Quote
Old 10-18-2006, 02:13 AM   PM User | #4
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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.
__________________
||||If you are getting paid to do a job, don't ask for help on it!||||
_Aerospace_Eng_ is offline   Reply With Quote
Old 10-18-2006, 06:06 AM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,465
Thanks: 0
Thanked 499 Times in 491 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/
felgall is offline   Reply With Quote
Old 10-18-2006, 12:56 PM   PM User | #6
gsnedders
Senior Coder

 
gsnedders's Avatar
 
Join Date: Jan 2004
Posts: 2,340
Thanks: 1
Thanked 7 Times in 7 Posts
gsnedders will become famous soon enough
Quote:
Originally Posted by _Aerospace_Eng_ View Post
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.
__________________
Geoffrey Sneddon
gsnedders is offline   Reply With Quote
Old 10-24-2006, 09:07 PM   PM User | #7
zcorpan
New Coder

 
Join Date: May 2006
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
zcorpan is an unknown quantity at this point
Quote:
Originally Posted by felgall View Post
[...] 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).
zcorpan is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 10:26 PM.


Advertisement
Log in to turn off these ads.