Re: Fwd: Missed closing-tag ignored by "Markup Validation Service"-script ! ?

On Tue, 15 Feb 2005, olivier Thereaux wrote:

> Forwarding this message sent to the list administrative address by
> mistake.
- -
> > Example (or see File "shtml.html"):

I cannot see any file "shtml.html". Please post a URL in future when
reporting problems in validation.

> > <table>
> >   <tr>
> >     <td>Text
> >   <!-- At this position some tags are missed! but validation don't
> > mention -->
> >   <tr>

Given the actual markup snippet, there is no missing tag in the
position indicated by the comment. The end tag </td> is optional in all
versions of HTML until XHTML.

Some browsers are known to get confused when </td> tags are omitted
(though this is probably not very relevant today - for example, Netscape 4
used to get wild if you had nested tables and omitted </td> tags).
If you wish to close all table cell elements explicitly and wish to use a
validator to check that you have actually done so, you could validate
against a Document Type Definition that makes the end tags mandatory. See
http://www.cs.tut.fi/~jkorpela/html/own-dtd.html
for a more detailed explanation. To handle just the </td> and </th> issue,
you would edit the declaration

<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->

by changing the letter "O" to the character "-".

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

Received on Tuesday, 15 February 2005 07:46:16 UTC