HTML:- Link Tag

<!DOCTYPE html> 
<html> 
 
<head> 
 <meta name="viewport" content="width=device-width, initial-scale=1"> 
 <title>Links in HTML</title> 
</head> 
 
<body> 
 
 <a href="http://www.geniusofstudent.blogspot.com">Open geniusofstudent</a> 
 <br> 
 <a href="http://www.geniusofstudent.blogspot.com" target="_blank">Open geniusofstudent in new tab</a> 
 
</body> 
 
</html>


Output:-   Open geniusofstudent 
Open geniusofstudent in new tab


Definition:-  

Angle tag


  • This tag defines a hyperlink, which is used to link from one page to another.
  • The most important attribute of this element is the href attribute, which indicates the link's destination.
  • By default, links will appear as follows in all browsers:
target attribute
  • Default target attribute is _self. This is used for open the specified page on the same page. 
    eg)
    <a href="http://www.allinworld99.blogspot.com">Open Allinworld99</a>
  • In this example we are specified the target="_blank", is used for open the spefied web page on the next page(in new tab). 
    eg)
    <a href="http://www.allinworld99.blogspot.com" target="_blank">Open Allinworld99 in new tab</a>
Default color of <a> tag
  • An unvisited link is underlined and blue.
  • A visited link is underlined and purple.
  • An active link is underlined and red.
HTML:- Link Tag HTML:- Link Tag Reviewed by Network security on April 30, 2019 Rating: 5

No comments:

Useful Information

Powered by Blogger.