Often you might want to direct a reader to the middle of a particular page on your site or perhaps to the end of a page or a post. Either way, you are probably trying to refer your readers to some particular content on that page and don’t want to leave it up to them to plough through the entire page looking for the snippet that you have asked them to find.
The way to do this is by using bookmarks and these are very easy to set up in your code. The following shows you how …
Example of How to Insert a Bookmark
Let’s say the snippet that you want your reader to “jump to” is the following h1 heading:
Stylish Red Shoes
- Access your code window and find that heading:
<h1>Stylish Red Shoes</h1>
- Add the name of your bookmark (you can decide on the name) to the html tag, in this case the h1 tag:
<h1 id=”bookmark1″>Stylish Red Shoes</h1>
- Save your page and just check that you have the code entered correctly by previewing the page in a browser.
Example of How to Hyperlink to a Bookmark
Now return to the page or post from which you wish to hyperlink to the bookmark. This can be on the same page or from an external page. Let’s say the sentence you wish to link from is:
You can view our range of red shoes here.
- Access your code window and find that sentence:
<p>You can view our range of red shoes here.</p>
- Insert a hyperlink that will take the reader to the destination page and then the bookmark within that page:
<p href = “#bookmark1”>You can view our range of red shoes here.</p>
If you are linking from a different page, one external to the bookmarked page, you will need to include the page/post URL:
<p href = “http://www.yoursite.com/page-with-bookmark/#bookmark1”>You can view our range of red shoes here.</p>