|
Posted by Chris F.A. Johnson on 08/15/07 01:40
On 2007-08-14, Richard wrote:
> But I got this "name" attribute from http://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)
Navigation:
[Reply to this message]
|