Anchor Tags

Overview

An anchor tag is an HTML tag. It is used to define the beginning and end of a hypertext link.

The name attribute of the anchor tag can be used to enable users to “jump” to a specific point on a page (jump marker, anchor).

Usage

The HTML code for an Anchor tag with the Name attribute looks like this:

<a name="to top"></a> or
<a name="Content">Content</a>

In the first code sample, you link from the bottom of a page back to the beginning, so users can quickly get to the top of the page without having to scroll for a long time. In the second example, users can directly access a part of the page, for example, a subdivision point. By clicking, users are guided via name attribute directly to the subject.

<a href="#Content">Content</a>

By simply setting a hash tag (#) at the anchor name, the browser can identify a jump within the page.
You can also link to a specific location on another page internally. This would be defined as follows:

<a href="anotherpage.html#name">Linktext</a>

The “#name” is specified after the filename.

Using Anchors in Zoey

Anchors in HTML work with Zoey as they do anywhere else.

Using a Text or HTML block you will add the following link:

<a href="[/page-URL#anchor]">link text</a>

And on the page that links to you would put the following in a Text or HTML block where you want the anchor location to be:

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

📘

Adding Anchor Tag HTML to Text Blocks

You can edit the HTML of any Text block by clicking the < > button in the WYSIWYG text editor.