Re: Tags lacking a terminating '>' are spotted

>On 5 Feb 2002 at 11:44, ewitness - Ben Fowler wrote:
>
>>  Here is a topic from the Tidy documentation -
>>
>>         This is something you then have to fix yourself as
>>         Tidy is unsure of where the > should be inserted.
>>
>>  Are there example web pages or markup where tags missing their TAGC
>>  cause ambiguity?
>
>OK, you tell me where to put the > in this:
>
><td nowrap is a deprecated attribute for table data cell elements ...

I think I see.

Plugging your example into the WDG validator gives no
fewer than 10 validation errors.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
         "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
	<title>Untitled</title>
	<meta name="generator" content="BBEdit 6.5">
</head>
<body>
<table>
	<tr>
		<td nowrap is a deprecated attribute for table data 
cell elements ...</td>
		<td>Right</td>
	</tr>
</table>
</body>
</html>

The code I posted was valid SGML.

Yes, if you remove the requirement that the mark up is valid, I
can certainly see that one can create examples where there is more
than one place that the TAGC could go.

Even in this case, you could make a rule that the TAGC
goes in the last place that it could to make a properly
formed element.

Of course it is more than arguable that Tidy ought
not to suggest reparing such a construct with

     <td nowrap>

as attribute minimization is not part of XHTML.

I will try feeding a few of these to Tidy and see what
it does.

Ben.

Received on Tuesday, 5 February 2002 10:29:59 UTC