Re: HTML is a declarative mark-up language

Philip TAYLOR (Ret'd) wrote:
> Boris Zbarsky wrote:
> 
>>   <a id="mytable"></a>
>>   <table><tr><td>
>>     This is an important table that people should link to
>>   </td></tr></table>
> 
> There is another reason : Dreamweaver, in its infinite
> wisdom, does not allow <A NAME="..."> ... </A> to be
> wrapped around existing content

Well....  This markup:

   <a id="mytable">
     <table><tr><td></td></tr></table>
   </a>

is not valid HTML 4 (or HTML 3.2, for that matter).  <a> is not allowed 
to contain <table>.  I gather that DreamWeaver has the behavior your 
describe even in cases when the existing content is allowed inside <a>, 
but I did pick the example I picked pretty carefully: what I wrote is 
actually best practice HTML 3.2 if you want to link to a table and 
author conformant HTML.  It's the only way to author conformant HTML 4 
in that situation without linking to an id on the table directly.

-Boris

Received on Friday, 30 January 2009 21:51:05 UTC