html.anchor

HTML Anchor

The HTML anchor tag defines a hyperlink that links one page to another page. The “href” attribute is the most important attribute of the HTML a tag.

href attribute of HTML anchor tag

The href attribute is used to define the address of the file to be linked. In other words, it points out the destination page.

The syntax of HTML anchor tag is given below.

<a href = "..........."> Link Text </a>

Let’s see an example of HTML anchor tag.

  1. <a href=“second.html”>Click for Second Page</a>  

Test it Now


Appearance of HTML anchor tag

An unvisited link is displayed underlined and blue.

visited link displayed underlined and purple.

An active link is underlined and red.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s