|
Posted by Jukka K. Korpela on 10/02/06 17:01
Scripsit petermichaux@gmail.com:
> When I validate a HTML 4.01 STRICT document it doesn't like to see a
> closed tag like this
>
> <link rel="stylesheet" href="base.css" type="text/css"/>
Of course it doesn't "like" it, since the ">" character data is invalid in
the context where the <link> element is allowed. What did you expect a
validator to do if not validate?
> Does anyone know why the link cannot be closed in HTML?
Of course the <link> element can and must be closed in HTML. It is
self-closing, i.e. no explicit end tag is allowed, since it has EMPTY
declared content. And you actually close the <link> _tag_ (and thereby the
<link> element, too) if you use that "/" character, but then you have a
problem with the subsequent ">". See
http://www.cs.tut.fi/~jkorpela/html/empty.html
> It seems
> strange if HTML 4.01 is supposed to be closely parallel with XHTML.
They are two different syntaxes. It is absurd to use one and expect it to
validate under the other.
Just don't mix good old HTML and XHTML, mm'kay? Actually, just don't put any
XHML on the web before at least the most common browser supports it, mm'kay?
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|