Thursday, March 10, 2011

HTML Anchor Bookmark Tag Links

HTML anchor < a > tag is also very useful for creating bookmark links.
HTML bookmark tag links help in linking the different parts of a single HTML document. HTML bookmark tag link navigates the web page to the targeted location of same or different web page. name attribute of HTML anchor <a> tag provides the feature of bookmark links. For example if there is an anchor tag with name="top":

<a name="top">Title Text here</a>

Above HTML link works as a bookmark link. You can navigate to this bookmark by using href="#top" in another HTML anchor <a> tag link:

<a href="#top">go to top</a>

Above HTML bookmark tag link code works within the single web page. If you want to open the bookmark of another web page then you have to specify the page name also. For example page2.html contains the HTML anchor tag with name="top", then you can open the target bookmark link as following:

<a href="page2.html#top">go to page2 top</a>

HTML Bookmark link tags are very beneficial for the long pages like FAQs of web sites. Top section of web page displays the frequently asked questions linked using HTML bookmark tag to their answers on the same page.
You can also use two way bookmark links in HTML web page. For example:

<a href="#bottom" name="top">go to bottom</a>

Use above link at the top of your web page.

<a href="#top" name="bottom">go to top</a>

Use above link at the bottom of your web page. Both links will work as bookmark links to each other.

No comments:

Post a Comment