You are here: Re: Display same-page linked item on top - How to? « HTML « IT news, forums, messages
Re: Display same-page linked item on top - How to?

Posted by Richard on 08/15/07 05:50

On Aug 14, 9:40 pm, "Chris F.A. Johnson" <cfajohn...@gmail.com> wrote:
> On 2007-08-14, Richard wrote:
> > But I got this "name" attribute fromhttp://www.w3schools.com/html/html_links.asp,
> > where it claims:
> ><quote>
> ><a name="tips">Useful Tips Section</a>
>
> > You should notice that a named anchor is not displayed in a special
> > way.
>
> > To link directly to the "tips" section, add a # sign and the name of
> > the anchor to the end of a URL, like this:
> ><quote>
> ><a href="http://www.w3schools.com/html_links.asp#tips">Jump to the
> > Useful Tips Section</a>
> > [snip]
> ><a href="#tips">Jump to the Useful Tips Section</a>
> ></quote>
>
> > Is this W3Schools stuff outdated? Any other suggestions?
>
> No, but you need to read it more carefully (or maybe they need to
> explain it clearly). The "name" attribute can be applied to an
> acnchor, but not to a heading.
>
> That usage is not recommended however; it is generally considered
> better to use the "id" attribute instead.
>
> --
> Chris F.A. Johnson <http://cfaj.freeshell.org>
> ===================================================================
> Author:
> Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

Hi Chris,

> > Is this W3Schools stuff outdated? Any other suggestions?
>
> No ...

I'm glad to know that because I've visited the site a lot and
benefited a lot from it.

> ... but you need to read it more carefully (or maybe they need to
> explain it clearly). The "name" attribute can be applied to an
> acnchor, but not to a heading.

I noticed that it was applied to an anchor, but didn't notice
anything suggesting that other tags couldn't use the "name"
attribute. If I hadn't used this referencing approach before (with
"id", apparently, but I couldn't remember the attribute), I might not
have presumed it would apply to other tags. But all's well that ends
well ... that's my motto.


> That usage is not recommended however; it is generally considered
> better to use the "id" attribute instead.

Great!

Best wishes,
Richard

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация