By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,892 Members | 710 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,892 IT Pros & Developers. It's quick & easy.

difference between html and xhtml

P: 125
Hello Friends,

difference between html and xhtml which one is better ?

Jan 20 '07 #1
Share this Question
Share on Google+
2 Replies

Expert 5K+
P: 7,435
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

P: 125
dear drhowarddrfine

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

Jan 21 '07 #3

Post your reply

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