Click here to get back home

Anchors with name _and_ id?

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Anchors with name _and_ id? andrew 09-13-2007
Posted by andrew on September 13, 2007, 12:36 am
Please log in for more thread options


Hi,

I have routinely added anchors to pages using both name and id:

<a name="example" id="example"></a>

under the possibly mistaken assumption that at some stage "name" might
be deprecated but "id" was unlikely to be.

Can I ask what is accepted practice currently?

Thanks for your trouble,

Andrew

--
Andrew's Corner
http://people.aapt.net.au/~adjlstrong/ubuntu_cli.html

Posted by Lars Eighner on September 13, 2007, 1:57 am
Please log in for more thread options


talented andrew broadcast on comp.infosystems.www.authoring.html:

> Hi,

> I have routinely added anchors to pages using both name and id:

><a name="example" id="example"></a>

> under the possibly mistaken assumption that at some stage "name" might
> be deprecated but "id" was unlikely to be.

That name would be deprecated was announced with XHTML 1.0 and name
was deprecated for A and MAP in XHTML 1.1. Of course it is going to be in
HTML 4.x forever and XHTML is pretty much neither fish nor fowl so let's not
feed into that can of worms.

> Can I ask what is accepted practice currently?

Accepted practice is to make your documents conform to the DTD you are
using. If you are using HTML 4.x, you certain can explicitly close all your
tags and use both name and id together, lowercase your element names and
attributes. This will simply make it easier to convert your documents to
XML or XHTML if you ever want to do so. Your documents will not suddenly
stop working one day when you upgrade your browser, but you may want to make
them work on new devices with new kinds of clients --- or make it easier for
new kinds of clients to convert your documents on the fly.

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 495 days to go.
What do you do when you're debranded?

Posted by David Stone on September 13, 2007, 8:41 am
Please log in for more thread options



> talented andrew broadcast on comp.infosystems.www.authoring.html:
>
> > Hi,
>
> > I have routinely added anchors to pages using both name and id:
>
> ><a name="example" id="example"></a>
>
> > under the possibly mistaken assumption that at some stage "name" might
> > be deprecated but "id" was unlikely to be.
>
> That name would be deprecated was announced with XHTML 1.0 and name
> was deprecated for A and MAP in XHTML 1.1. Of course it is going to be in
> HTML 4.x forever and XHTML is pretty much neither fish nor fowl so let's not
> feed into that can of worms.

But not html 5...

http://www.w3.org/html/wg/html5/diff/#absent-attributes

"name attribute on map, img, object, form, iframe, a (use id instead)."

Posted by Lars Eighner on September 13, 2007, 11:11 am
Please log in for more thread options


In our last episode,
the lovely and talented David Stone
broadcast on comp.infosystems.www.authoring.html:


>> talented andrew broadcast on comp.infosystems.www.authoring.html:
>>
>> > Hi,
>>
>> > I have routinely added anchors to pages using both name and id:
>>
>> ><a name="example" id="example"></a>
>>
>> > under the possibly mistaken assumption that at some stage "name" might
>> > be deprecated but "id" was unlikely to be.
>>
>> That name would be deprecated was announced with XHTML 1.0 and name
>> was deprecated for A and MAP in XHTML 1.1. Of course it is going to be in
>> HTML 4.x forever and XHTML is pretty much neither fish nor fowl so let's not
>> feed into that can of worms.

> But not html 5...

> http://www.w3.org/html/wg/html5/diff/#absent-attributes

> "name attribute on map, img, object, form, iframe, a (use id instead)."

Where is the DTD?

--
Lars Eighner <http://larseighner.com/> <http://myspace.com/larseighner>
Countdown: 495 days to go.
What do you do when you're debranded?

Posted by David Stone on September 13, 2007, 2:51 pm
Please log in for more thread options



> In our last episode,
> the lovely and talented David Stone
> broadcast on comp.infosystems.www.authoring.html:
[snip]
>
> > But not html 5...
>
> > http://www.w3.org/html/wg/html5/diff/#absent-attributes
>
> > "name attribute on map, img, object, form, iframe, a (use id instead)."
>
> Where is the DTD?

That's covered in section 2 of the html 5 draft. I should emphasize
that it _is_ a draft document still, although it does make interesting
reading. According to the schedule at the bottom of the main working
group page, it'll be a few years yet before the draft becomes a full-
fledged recommendation. See http://www.w3.org/html/wg/

Similar ThreadsPosted
Anchors! August 26, 2004, 6:37 am
specifying anchors and cgi parameters in a single URI February 24, 2006, 8:34 am
Submit a form using anchors? November 8, 2006, 3:53 pm
On-Page Anchors not working properly December 7, 2005, 10:33 pm
Empty Anchors, I can't find a W3C specification for it April 7, 2007, 7:39 am
HTML Refreshing Problem with Meta Tags, Anchors, Commas, Semicolons April 25, 2006, 12:25 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap