Difference in HTML and XHTML

jag5311's picture

They have: 202 posts

Joined: Jan 2002

What can be done with XHTML that cannot be with HTML. Do sites with XHTML look different then ones with HTML. If so, could you provide me with some examples of websites using XHTML

thanks

bryan

Busy's picture

He has: 6,151 posts

Joined: May 2001

In brief, the "x" of XHTML is from XML, which allows you to make your own tags and things. but apart from that XHTML is just the next version of HTML, but true XHTML relies heavily on CSS, doesnt use, tags like, ,,,, .. all these are done with CSS. All tags in XHTML have to be lower case, all values have to have quotes (name="thename"), all tags have to be closed (except the doc type tag which is part caps, isnt closed but is only used for validating), also has to have the meta language tag (english, latin, french etc) done by way of charset. png's are catered for as well etc

You wont know what sites are done using html or xhtml (unless you use an older browser) and if you look at the soucre code on a site you'll see things like which is for closing single tags, later this will be changed to just or but older browser (think its vers5 and under) dont know this way and wouldnt disply the tag, so for now the gap must be used.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.