Re: Missing anchor names in http://www.w3.org/TR/xhtml-basic/

webmaster@newwinecc.org wrote:

> The Table of Contents has <a href...> tags that point to Anchor's with in
> the page.
> 
> Example Line 203:
>   <li>2. <a href="#s_conformance">Conformance</a>
> 
> The line I believe it is trying to point to is 441:
> <h2 id="s_conformance">2. Conformance</h2>
> 
> I am using Netscape 4.74 as my browser on the Win95b platform.

Unfortunately Netscape 4.x doesn't support ID as an anchor.  Use Netscape 6,
or recent versions of other Web browsers such as Amaya, Internet Explorer,
Lynx, Mozilla, Opera, or w3m.  They all support ID as an anchor.

> To get this
> type of anchor to work on my site (http://www.newwinecc.org/) I would have
> to change line 441 to read as follows:
> <h2 id="s_conformance"><a id="s_conformance" name="s_conformance"></a>2.
> Conformance</h2>
> 
> I am not sure if I would need to list the id again in the <a...> tag or not
> so I did just in case.

ID has to be unique, so you cannot put the same ID value twice in
a document.

> If this code doesn't conform to xhtml 1.0, than I
> apologize in advance. But I do know that when I click on the <a
> href="#s_conformance"> My Netscape 4.74 browser goes to the top of the page.

We do know that ID does not work on Netscape 4.x, but nevertheless,
we chose to use the "id" attribute rather than the "name" attribute.
Note that "4.10 The elements with 'id' and 'name' attributes" of XHTML
1.0 said [1]:

    Note that in XHTML 1.0, the name attribute of these elements is
    formally deprecated, and will be removed in a subsequent version
    of XHTML.

And actually XHTML Basic doesn't support the "name" attribute anymore.
The XHTML Basic specification is written in XHTML 1.0 Strict, but it
only uses elements and attributes supported by XHTML Basic, thus the
"name" attribute is not used.

[1] http://www.w3.org/TR/2000/REC-xhtml1-20000126/#h-4.10

Regards,
-- 
Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium

Received on Wednesday, 3 January 2001 05:24:18 UTC