What has replaced the anchor tag's "name" attribute?

  • Thread starter Thread starter existential.philosophy
  • Start date Start date
E

existential.philosophy

I'm learning ASP.NET. On a page, I've created named locations with the
anchor tag like this: <a name="abc" />, and I've created links to
those tags like this: <a href="#abc">. That's the way I learned to do
it long ago, and it still works. However, Visual Studio gives me the
following warning:

Validation (XHTML 1.0 Transitional): Attribute 'name' is considered
outdated. A newer construct is recommended.

If the name attribute is really outdated, what is the new method I'm
supposed to be using?

-TC
 
In XHTML 1.0, the name attribute of these elements is formally deprecated,
and will be removed in a subsequent version of XHTML. Note that the html is
actually xhtml as per the document type declared at the top of the form by
visual studio.

I cant remember ever having a time where I had to use name ( although i
migh be wrong ), I think there are some dom methods which make use of the
attribute.

HTH
 
In XHTML 1.0, the name attribute of these elements is formally deprecated,
and will be removed in a subsequent version of XHTML. Note that the html  is
actually xhtml as per the document type declared at the top of the form by
visual studio.

I cant remember ever having a time where I  had to use name ( although i
migh be wrong ), I think there are some dom methods which make use of the
attribute.

HTH

Rain,

Thank you for the reply. If you don't use the "name" attribute, what
do you use instead when you want to create a link like the one I
described?

-TC
 
the id attribute.




In XHTML 1.0, the name attribute of these elements is formally deprecated,
and will be removed in a subsequent version of XHTML. Note that the html
is
actually xhtml as per the document type declared at the top of the form by
visual studio.

I cant remember ever having a time where I had to use name ( although i
migh be wrong ), I think there are some dom methods which make use of the
attribute.

HTH

Rain,

Thank you for the reply. If you don't use the "name" attribute, what
do you use instead when you want to create a link like the one I
described?

-TC
 
the  id attribute.





Rain,

Thank you for the reply. If you don't use the "name" attribute, what
do you use instead when you want to create a link like the one I
described?

-TC

Rain,

Thanks. That's exactly what I needed to know.

-TD
 
Back
Top