W3C home > Mailing lists > Public > www-html@w3.org > June 2005

Re: When is something a tag?

From: David Woolley <david@djwhome.demon.co.uk>
Date: Mon, 20 Jun 2005 21:05:13 +0100 (BST)
Message-Id: <200506202005.j5KK5Er01390@djwhome.demon.co.uk>
To: www-html@w3.org

> I like to know when something is a tag.
> For example <p> is a tag, but < p> is not (usually displayed as text).

A conforming XHTML processor should abort on encountering < p>.  Note
that IE isn't a conforming XHTML processor, but rather an HTML processor
with some special error recovery to cope with XHTML served as HTML.
(< isn't allowed in text and < space doesn't match the production for
a tag, so a document containing this wouldn't match the production for
an XML document, which is one of the conditions for it being not
well formed.)

> I would like to know if the definition of when it is a tag is defined by 
> a version of (X)HTML, or if this is defined by SGML (for HTML) or XML 
> (for XHTML).

Both the HTML and XML specifications are available for free download,
so you can check for yourself.  For HTML browsers only loosely follow
the specfication, otherwise XML constructs like <br /> would fail in
HTML.
Received on Monday, 20 June 2005 20:05:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:19:03 UTC