Basic HTML Tags (Part – 2)

By | February 20, 2019

After understanding basic information about HTML and his basic Tags, let’s continue with the other tags that is used to develop any web page.

1. HTML <a> Tag :

Define: The <a> tag defines a hyperlink.

Usage: If you want to provide hyperlink to any text or image then you can use this <a> tag, formaly known as a Anchor Tag, <a> tag is used to link from one page to another, in addition, it’s also use to link external urls

Attribute: <a> tag has some attributes, like href, title, target and so on, but the most important attribute of <a> tag is, href

Usages of attribute:

  • href : href attribute is use to provide link of any webpage where you want to redirect if someone click on that url
  • target: target is also useful attribute for opening the webpage on same window or new window
  • title: title will help, if someone mouse hover on that link then it will show the basic information about it.

Syntax: <a href=” — display URLs –“> — display text — </a>

Examples:

Simple : <a href=”http://www.bhaveshpatel.in”>Visit bhaveshpatel.in!</a>

Open in New Window : <a href=”http://www.bhaveshpatel.in” target=”_blank”>Visit bhaveshpatel.in!</a>

Mouse on hover hint : <a href=”http://www.bhaveshpatel.in” title=”Click here to visit bhaveshpatel.in!”>Visit bhaveshpatel.in!</a>