Reply to Re: </A> not needed?

Your name:

Reply:


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&gt;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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация