Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

HTML anchor Tag

HTML Anchor Tag

HTML Anchor Tag is used to put hyperlinks inside HTML.

The anchor tags are used to link pages and move from one page to another page.


Syntax

Link Text
This is the anchor text

Output

This is the anchor text

HTML anchor tag with absolute web url

An absolute web address is an address inside href attribute of anchor tag given by full website url.

HTML paragraph tutorial

Output

HTML paragraph tutorial

HTML anchor tag with relative web url

A relative web address is a address point to the same website.

This is relative URL for HTML table tutorial

Output

This is relative URL for HTML table tutorial

Anchor tag target attribute

The target attribute of anchor tag is used to specify the location to open the linked web document.

Sr. No. target atribute options Description
1 _blank Open the linked document in the new window/tab
2 _self Open the linked document in the same window/tab
3 _parent Used to create header cells in a table.
4 _top Used to create a cells in each rows of a table.

HTML table tutorial
    HTML table row tutorial
    HTML table cell tutorial
    HTML table body tutorial

Output

HTML table tutorial
HTML table row tutorial
HTML table cell tutorial
HTML table body tutorial

Anchor tag with email links

If you want your users to mail you some message then you have to place your email id with subject inside href attribute of anchor tag.

[email protected]

Output

[email protected]

Anchor tag with download links

If you want place download link for files with extensions zip, doc, pdf etc. You need to place destination url of the file inside href attribute of the anchor tag.

file for zip
    file for doc
    file for pdf

Output

file for zip
file for doc
file for pdf

Resources and References

1. W3C Specification.
2. HTML living standard
3. W3C project using Github

PDF Version

The post HTML anchor Tag appeared first on Tutorialdeep.



This post first appeared on Tutorialdeep - An Online Web Development And Blogging Tutorial, please read the originial post: here

Share the post

HTML anchor Tag

×

Subscribe to Tutorialdeep - An Online Web Development And Blogging Tutorial

Get updates delivered right to your inbox!

Thank you for your subscription

×