|
Posted by David Dorward on 06/25/06 07:02
Samuël van Laere wrote:
> <li><a href=http://www.someurltoadd.com>Click Me</a></li>
> The W3C HTML Validator doesn't want the ending </a> tag there.
> Why is that?
It is an oddity of SGML. Even though browsers don't generally support it,
the first slash character in the URL ends the tag, and the second ends the
element.
What you have there is, IIRC, the same as:
<li><a href="http:"></a>www.someurltoadd.com>Click Me</a></li>
If an attribute consists only of certain characters, then quotes are
optional, but its easier not to try to remember those excepts and simply
work to the rule "Always quote attribute values".
http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.2.2
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
[Back to original message]
|