This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3324 - Anchor with name same as id of another element validates
Summary: Anchor with name same as id of another element validates
Status: NEW
Alias: None
Product: Validator
Classification: Unclassified
Component: check (show other bugs)
Version: HEAD
Hardware: All All
: P2 minor
Target Milestone: ---
Assignee: Terje Bless
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-08 19:34 UTC by Benjamin Higgins
Modified: 2006-06-08 19:34 UTC (History)
0 users

See Also:


Attachments

Description Benjamin Higgins 2006-06-08 19:34:26 UTC
There is an example of illegal HTML shown at:

http://www.w3.org/TR/html4/struct/links.html#h-12.2.3

It seems that for anchors, names and ids share a namespace, and so anchors must have unique names.

The following is based on the given illegal example, and (erroneously?) validates.


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">

<html>

<head><title>Title</title></head>

<body>

<p><a href="#a1">foo</a></p>

<h1 id="a1">foo<a name="a1"></a></h1>

</body>
</html>