HTML allows linking to other Html documents as well as images. Clicking on a selection of text or an image in 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 colour Blue is the default colour in a browser for hyperlink Color can be dynamical if required.
Hyperlink text or image is 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 hyperlink there are three attributes in the body tag.
- Link-changes the default colour of a hyperlink to whatever colour is specified with this tag
- A link-changes the default colour of a hyperlink that is activated to whatever colour is specified with this tag.
- Vlink-changes the default colour of a hyperlink that is already visited whatever colour is specified with this tag.
Creating a Hyperlink
Hyperlinks are those little spots you click on to go somewhere else on the web. Can create a hyperlink with the anchor tag.
<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 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
|_blank||Opens the linked document in new window or tag|
|_self||Opens the linked document in the same frame as it was clicked.|
|_parent||Opens the linked document in the parent frame|
|_top||Opens the linked document in the full body of the window|
|Framename||Opens the linked document in a named frame|
<a href='https://tutsmaster.org/' target='_blank'>TutsMaster</a>