W3C home > Mailing lists > Public > www-validator@w3.org > January 2005

Re: Alone tag

From: Paul Norman <penorman@mac.com>
Date: Thu, 6 Jan 2005 19:45:37 -0500
Message-Id: <72B187C1-6045-11D9-8A91-001124301DAA@mac.com>
Cc: www-validator@w3.org
To: Fabrice Deydier <fabrice@my-industry.net>

On 31-Dec-04, at 3:01 AM, Fabrice Deydier wrote:
> Hi Abyss,
>
> I have created 3 pages :
> http://www.my-industry.net/testhtml1.php
> It's a HTML 4.01 valid page. Look at the tags : <META>, <LINK> and the
> first <A>
>
> http://www.my-industry.net/testhtml2.php
> I have changed the tags with <META />, etc...
> The page is not HTML 4.01 valid !!! But it's XHTML 1.0 (transitional)
> valid.
That's since you have character data within the head element, namely a
less than sign. If you treat the document as XHTML then you don't. The 
/ closes
the tag. If you revalidate with the parse tree you can see what's 
happening.

> I note that the alone tags <IMG /> and <BR /> are correct.
<IMG /> is equivalent to <IMG>&lt; in HTML.

>
> http://www.my-industry.net/testhtml3.php
> I have closed the tags <META></META>, etc...
> The page is not HTML 4.01 valid : The V3C validator don't accept the 
> </META>
> and </LINK> tags.
That's since the end tag for META is forbidden. [1]
> But the <A></A> is correct !
That's since the end tag for A isn't forbidden, but required. [2]
> The page is XHTML 1.0 (transitional) valid.
>
> Well, I am suprised of the differences between the traitment of the
> <META>, <LINK>, <A> tags vs <IMG /> or <BR />.
The end tags for META, LINK, IMG and BR are forbidden but the end tag 
for A
is required. Also, META and LINK appear where character data is 
forbidden
but A, IMG and BR don't always.

[1]: http://www.w3.org/TR/html401/struct/global.html#h-7.4.4.2
[2]: http://www.w3.org/TR/html401/struct/links.html#h-12.2
Received on Friday, 7 January 2005 00:45:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:18 GMT