469,960 Members | 1,876 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,960 developers. It's quick & easy.

difference between html and xhtml

sanjay123456
125 100+
Hello Friends,

difference between html and xhtml which one is better ?

sanjay
Jan 20 '07 #1
2 1856
drhowarddrfine
7,435 Expert 4TB
Assuming you know what HTML is, XHTML is just a reformulation of HTML using XML. So Xhtml is, essentially, XML that works as HTML. Being XML, Xhtml can be much more flexible when creating web sites. It is also much more strict in the rules for creating the content.

However! Not all browsers can interpret Xhtml properly. IE does not natively support it while Firefox and Opera and others do. In addition, most servers you would rent space on serve web pages as text/html, meaning as html pages even though you give a Xhtml doctype. So writing Xhtml doesn't do any good in that case.

So which is better? HTML 4.01. Because IE doesn't understand Xhtml and your server probably serves all code as html anyway.

You might be interested in this: XHTML differences with HTML4.
Jan 20 '07 #2
sanjay123456
125 100+
dear drhowarddrfine

thx for telling me . its very helpful to me for understanding

sanjay
Jan 21 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

87 posts views Thread by CMAR | last post: by
6 posts views Thread by Neil Cherry | last post: by
6 posts views Thread by Wes Groleau | last post: by
3 posts views Thread by Yansky | last post: by
14 posts views Thread by Stanimir Stamenkov | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.