Web Development

HTML – An Anchor Tag or Link Tag

HTML allows linking to other Html documents as well as images. Clicking on a selection of text or an image on one web page will open an entire web page or an image.

Text or image that provides such linkages is called hypertext, hyperlink, or a hotspot. Browser distinguishes hyperlinks from normal text. Hyperlinks appear blue in color Blue is the default color in a browser for hyperlinks Color can be dynamic if required.

Hyperlink text or image underlined. When the mouse cursor is placed over it, the standard arrow-shaped mouse cursor changes to the shape of a hand. To change the settings of hyperlinks, there are three attributes in the body tag. 

  • Link-changes the default color of a hyperlink to whatever color is specified with this tag 
  • A link changes the default color of a hyperlink that is activated to whatever color is specified with this tag. 
  • Vlink-changes the default color of a hyperlink that is already visited whatever color is specified with this tag. 

Creating a Hyperlink

 
HTML Anchor Tag

Hyperlinks are those little spots you click on to go somewhere else on the web. Can create a hyperlink with the anchor tag. 

HTML Code

<a href='https://www.google.com'>Click here for Google visit</a>
<a href='https://www.facebook.com/'>Click here for Facebook visit</a>
<a href='http://bing.com/'>Click here for Bing visit</a>

HTML Output

Click here for Google visit
Click here for Facebook visit
Click here for Bing visit

HTML Links With Target Attribute

The target attribute specifies where to open the link. If you use the target attribute it will help you to open your link in New Browser or New Tab.

The Values of Target Attribute

ValuesDescription
_blankOpens the linked document in new window or tag
_selfOpens the linked document in the same frame as it was clicked.
_parentOpens the linked document in the parent frame
_topOpens the linked document in the full body of the window
FramenameOpens the linked document in a named frame

HTML Code

<a href='http://tutsmaster.org/' target='_blank'>TutsMaster</a>

HTML Output

TutsMaster.org

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.

You may also like

HTML introduction
Web Development

HTML – Introduction, History & Syntax

  • December 21, 2019
So, first of all, I would like to ask a question for the first time when you heard this term
html heading tag
Web Development

HTML – Heading Tag With Syntax

  • December 21, 2019
A heading tag is one of the most important tags we focus on in HTML or web development because, without