HTML Links - Create Bookmark



HTML bookmarks are used to allow readers to jump to specific parts of a Web page.
Bookmarks can be useful if your webpage is very long.
To make a bookmark, you must first create the bookmark, and then add a link to it.
When the link is clicked, the page will scroll to the location with the bookmark.

Example no. 1

First, create a bookmark with the id attribute:

<h2 id="C4">Chapter 4</h2>

Then, add a link to the bookmark ("Jump to Chapter 4"), from within the same page:

<a href="#C4">Jump to Chapter 4</a>

Or, add a link to the bookmark ("Jump to Chapter 4"), from another page:

Example
<a href="html_demo.html#C4">Jump to Chapter 4</a>


Example no. 2

To create a bookmark:
<div class="MsoNoSpacing">
<span style="mso-bidi-font-family: Calibri;"><a href="#TOC">^
<span style="mso-bookmark: year1914;"></span>1914</a><!--[if !supportNestedAnchors]--><a href="https://www.blogger.com/null" name="year1914"></a><!--[endif]--><o:p></o:p></span></div>

Then, add a link to the bookmark ("1914"), from within the same page with the href attribute (href="#value"):
<div class="MsoNoSpacing">
<span style="mso-bidi-font-family: Calibri;"><a href="#year1914">1914</a><o:p></o:p></span></div>

Example no. 3

<div class="MsoNoSpacing">
<span style="mso-bidi-font-family: Calibri;"><a href="#cRjbTest">RjbTest</a><o:p></o:p></span></div>                  Note: To add a link to the bookmark ("cRjbTest")
<div class="MsoNoSpacing">
<a href="https://www.blogger.com/null" name="RjbTest"></a><o:p></o:p></span></div>   Note: To create the bookmark ("RjbTest")

<div class="MsoNoSpacing">
<span style="mso-bidi-font-family: Calibri;"><a href="#RjbTest">RjbTest</a></span>   Note: To add a link to the bookmark ("RjbTest")
<a href="https://www.blogger.com/null" name="cRjbTest"></a><o:p></o:p></span></div>    Note: To create the bookmark ("cRjbTest")




Comments