Reply to Re: XHTML vs HTML

Your name:

Reply:


Posted by Toby Inkster on 07/18/06 18:50

Michael Laplante wrote:

> Okay, I'm a little fuzzy on the differences between XHTML and HTML spec 4
> and above.

The only real difference is that XHTML has to obey XML rules, whereas HTML
doesn't. The places it manifests itself are:

1. All elements must be explicitly closed. In HTML some elements have an
optional closing tag (e.g. <p>, <li>) and some elements must never have a
closing tag (e.g. <meta>, <hr>). In XHTML, the closing tags are required.
Optionally, you can compact the opening and closing tags into one tag
(e.g. "<br></br>" crunches down to "<br/>") -- this may improve browser
support.

2. Element and attribute names are case-sensitive. That is, <p> and <P>
are completely different tags -- XHTML uses lower-case for all element and
attribute names, but attribute values still follow HTML rules, as they're
completely consistent with XML syntax.

3. Under HTML there are certain circumstances where attribute values don't
need quoting. Under XHTML, they always need quoting.

There are other minor differences, the full list is here:
http://www.w3.org/TR/xhtml1/#diffs

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация