|
Posted by David Dorward on 01/22/06 23:39
John Salerno wrote:
> Ok, I understand that XHTML and HTML are basically the same, but that
> XHTML requires a stricter structure, which it inherits from XML.
Stricter is a bit debatable. XML doesn't have as many places that you are
allowed to ignore a rule (e.g. In HTML the end tag for a p element is
optional), but nor is the DTD as expressive (so a validator can't spot the
error <a><b><a>...</a></b></a> in an XHTML document, while it can in an
HTML document).
> But what is meant when someone says that XHTML *is* XML? I know that HTML
> is an SGML language, and XHTML is an XML language, but what does that
> really mean?
XML defines some basic rules. Add some more rules and you have XHTML. Add
some different rules and you have RSS. Different rules again and you get
SVG.
> It seems to suggest that I can create my own tags in XHTML
You can't.
> (since you can in XML)
You can create your own XML based markup language with tags of your choice.
(Although it isn't of much practical value on the WWW).
> Is it safe to say that XHTML is a completely new language based on XML
> that just happens to have all the same-named tags as HTML?
Pretty much.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
[Back to original message]
|