Jump to content

An Anchor URL


niche

Recommended Posts

An anchor is an element defined by the <a> tag. If you give an anchor an ID (or a name, for older browsers), you can set up another anchor to link to that part of the page using the hash symbol. For example, if you had:

<a id="anchor"></a>

Then you link to the part of the page with that tag using:

<a href="#anchor">Click here</a>

Link to comment
Share on other sites

Sounds like that might come in handy if you have a long page and want to move around quickly as in a page has 50 chapters and each chapter is an anchor where navigation linked to 50 different anchors .Right ?

Link to comment
Share on other sites

Yes... but you may want to just split that up into multiple pages anyway, or else loading times will be horrible. :)

Link to comment
Share on other sites

you don't have to necessarily use ID on an <a> tag. Any element can be given an ID, and thus linked inpage.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...