Re: end tag rules

On Sun, 7 Nov 2004, Klaus Schmid wrote:

> what are the rules for using end tags

Some end tags are omissible, some are not. The omissibility is indicated
in the <!ELEMENT> declaration the use of the letter "O" in an appropriate
place. In XML, and hence in XHTML, end tags are never omissible.

> <hr><p><small><a
>   href="view-source:http://jedscripts.freelinuxhost.com/index.htm"
> >This Page </a>Is <a
>   href="http://validator.w3.org/check/referer"
> >Valid </a><a
>   href="http://www.w3.org/TR/1999/REC-html401-19991224/"
> >HTML 4.01 </a>Strict!</small></p></body>
>
> are the last two needed really?

The tags </p> and </body> (as well as the following </html>) can be
omitted in "classic" (pre-XHTML) HTML. But why do you ask? It's always
been a good practice to include them, and the gain in file size achieved
by omitting them is _really_ small.

By the way, note that first link, though valid, does not conform to
specifications, since it uses the view-source: (pseudo-)URL, which has not
been included into any published specification.

On the other hand, the entire paragraph is worse than useless, see
http://www.cs.tut.fi/~jkorpela/html/validation.html#icon
(replacing the icon by equivalent text does not really make things much
better).

-- 
Jukka "Yucca" Korpela, http://www.cs.tut.fi/~jkorpela/

Received on Sunday, 7 November 2004 16:17:36 UTC