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

difference between html and xhtml

sanjay123456
100+
P: 125
Hello Friends,

difference between html and xhtml which one is better ?

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


drhowarddrfine
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

sanjay123456
100+
P: 125
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.