|
Posted by David Dorward on 05/26/06 20:48
ZeldorBlat wrote:
> In XHTML all tags must close (and be properly nested).
All elements, not all tags. Some tags open elements, some tags close
elements, some do both. The proper nesting is also not new, its just that
so many people wrote such bad markup, that the authors of XHTML 1.0 decided
it was worth mentioning again (and managed to spring up a myth that proper
nesting isn't required in HTML, thankfully it doesn't seem to be a very
common myth).
> HTML doesn't have this requirement.
All elements must still be closed, but this can be done implicitly for some
elements. Some elements can be opened implicitly too. The spec describes
where end and start tags are required, optional and forbidden.
> Some tags (like <br>, <input>, and <hr>) don't have closing tags.
In HTML end tags for those elements are forbidden.
In XHTML they are required, but you can use the minimised form <foo/>.
Appendix C (which you are required to follow before serving as text/html,
but yet is covered with so many disclaimers as to be interpretable as not
specifying any requirements) makes things even more fun, since it insists
that elements which are /defined/ as being empty should use the minimised
syntax (and that the slash should be proceeded by a space), and that
elements which are not defined as being empty should _not_ use the
minimised syntax.
Just for extra fun, <br /> in HTML technically means the same as <br>> -
but most user agents get this wrong, so the so-called "HTML Compatibility
Guidelines" are in fact "Most HTML User Agents Compatibility (oh thank you
for being so buggy or we could never get away with this silly handwaving)
Guidelines"
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Navigation:
[Reply to this message]
|