Site hosted by Angelfire.com: Build your free website today!

 

 

Anchors:

Linking to a specific place within a document

 



You can link to a particular section of a document by first creating named anchors. Named anchors let you set markers in a document and are often placed at a specific topic or at the top of a document. You can then create links to these named anchors, which quickly take your visitor to the specified position.

Creating a link to a named anchor is a two-step process. First, create a named anchor, then create a link to the named anchor.

To create a named anchor:

1 Place the cursor in the part of the web page that you wish to jump to (where you want the named anchor).
2 Type <a name="anchor name> where the anchor name is the text you're using internally to identify that section of the web page you want the reader to jump to. Anchor names are case sensitive. Anchor names cannot contain spaces
3 Add the words or images that you wish to be referenced.
4. Type </a> to complete the anchor definition.
note You can also create an anchor by addind an id attribute to an element, something we'll get to much later.

To link to a named anchor:

1 Type <a href="#anchor name"> where anchor name is the value of the name attribute in the a tag you created.
2 Type the label next. That's the link text that is highlighted and will take you where you want to go.
3 Type </a> to complete the anchor definition.

Note: To anchor to a specific place on another page, use the <a href="page.html#anchorname"> format. No spaces!

If an anchor is at the bottom of the page, it probalby won't display at the top of the browser window unless you add a lot of breaks after it.

 

Here are some example of FAQ pages: dive Aruba | css frequently asked questions | faq about quasars | a simple example