Note: If you're looking for information about using anchor tags within an advanced bulletin, see Working with Content Blocks in Advanced Bulletins.
Anchor Tags No Longer Best Practice
Best practices in email design and content are always changing. One important change that we’ve witnessed at Granicus is that some email clients and mobile devices no longer honor anchor tags when they are inserted into emails.
Some email clients and mobiles devices will only display certain elements or features of the anchor tag code; others will not allow or display the anchor tag code at all. Because of this, using a table of contents in your organization’s newsletter with named anchors is simply no longer a best practice.
If you’re creating a bulletin that’s long enough to feel like it might need a table of contents, consider condensing your content. A better subscriber experience is sending shorter and more specific bulletins on a slightly more frequent basis, or sending a shortened version of your content and directing subscribers to permanent web properties, like your organization’s website.
If your organization still requires the use of a table of contents and anchor tags in your bulletins, instructions on how to insert them into your bulletin can be found below.
Creating a Table of Contents
The first step to creating anchor tags and a linking table of contents is to create the header structure at the top of your bulletin. You can use whatever structure you like, but simply enter the text for the order of your information in your bulletin. For example, your table of contents might look something like this:
I. Article Headline A
II. Article Headline B
III. Article Headline C
IV. Article Headline D
The next step to creating proper anchor tags and a table of contents is to insert content and structure your information. After you have your information and images added in the format you want them, you can begin to connect different section of your email to each other using anchor tags.
Creating and Naming Anchors
- In the bulletin editor, scroll to the headline or location in the bulletin that you would like to link to from somewhere else in the bulletin. Click on where you would like the anchor to be placed, and then select Anchor from the Insert menu.
- Name your anchor in the dialog box that opens. You must name the anchor so that you can reference it when you add a hyperlink to your table of contents. You can name your anchor whatever you like; however, most people choose to name it something easy to remember, like a number or letter or even the title of the header you’re anchoring to.
Note: Do not include spaces in your anchor name--if you do so, the anchor link will not work.
- Enter the name of the anchor and click Ok.
You can now use hyperlinks to bring viewers of your bulletin to the specific location you have anchored.
Linking a Table of Contents to Anchors
- Scroll to the top of your email once you have inserted and named all of the anchors for your bulletin.
- If you have not already created your table of contents section, do that now.
- Highlight the text that you would like to link to another section of your bulletin.
- Click on the Insert/edit link button in the toolbar.
- The Insert Link dialog box opens, which allows you to define the hyperlink for the location you’d like to link to.
- Click on the Anchors drop-down box to select your anchor.
- You’ll see the anchors you’ve created for the bulletin.
- Select the anchor you want to link to and click Ok.
After you’ve selected your anchor, the selected text in your bulletin will contain a hyperlink to that anchor.
Creating a "Back to Top" Anchor
Many people use anchor tags to create a "back to top" link in long emails to give viewers the ability to quickly return to the top of a bulletin. To do this, simply use the same process outlined above. Create an anchor tag at the very top of your bulletin and name it something simple like "top". Then, at the end of the desired sections in your bulletin, hyperlink the phrase "Back to Top." to "#top" and subscribers can click this hyperlink to be returned to the email.