7/2/20

HTML LINKS : ( Visited, Unvisited, Images as a Link )



HTML LINKS


In Html, Links are very useful for any website, Links are used to jumping from one webpage of the website to another webpage of the website as well as another website. Just click on the given link and reach the website whose link will be given. All website has links. To make a link we have to use <a> elements with <href> attribute that specify a URL of a page or website.


HTML LINK STRUCTURE


  • Start tag :- <a>
  • href attribute with URL ex:- href = “www.madaboutcomputer.com”
  • Element Content:-  Here you can write anything to describe the link you can also use an image here
  • End tag :- </a>


Example:


<html>

<head>

<title> Example of Links </title>

</head>

<body>

<a href = "https://www.madaboutcomputer.com"> Click Here to Reach Mad About Computer </a>

</body>

</html>


OUTPUT




Visited Links and Unvisited Links


Unvisited Link

Whenever you make a new link to your web page when you see it. It appears in the blue color with an Underline of your Text. This type of link is known as unvisited links.


Example:-



The above image is an example of an unvisited link.  


Visited Link

If you have ever created a link to your webpage. Initially, it will look blue, but if you click on it, it will show you a purple color with an underline on it. These types of links is known as visited link.


Example:-




By default, links will appear as follow in all browser:-


  • An Unvisited links appear in blue color with an underline.
  • A Visited links appear in Purple color with an underline.
  • An active link appear in Red color with underline.  

TARGET ATTRIBUTE IN HTML LINKS


By default, whenever you click on a link it will open in the same window. If you want to change the target of your link means if you want to open the link on a new window or anything else. Then you have to use the target attribute on your webpage. The target attribute specifies where your link has been open.


The target attribute have the following values are:-
  • _self – This value is used to open the link on the same window/tab. this is a default value means if you don’t give any specific target value on your link then your link is always open on the same window/tab.
  • _blank – This value is used to open your link in a new window/tab.
  • _parent – This value is used to open the link in the parent frame
  • _top – This value is used to open the link in the full body of the window


Use Image as a link


In Html links, you can also use any type of image as a link such as jpg, jpeg, png, gif, etc. Let us see how can we use an image as a link.


Example:-


<html>

<head>

<title> Example of Links </title>

</head>

<body>

<a href = "https://www.madaboutcomputer.com"> <img src = "C:\Users\Mad About Computer\Pictures\Smiley.png" style=" width: 79px;height: 68px;"></a>

</body>

</html>


OUTPUT:-



Whenever you click on the image, you will go directly to the website called www.madaboutcomputer.com


So, that is for today guys, I hope you liked the Html series if you have any quarries about Html or this article comment the below or DM on my social media handles.


Thanks For Visiting here.


PEOPLE ALSO READ:-  HOW TO CREATE AN FACEBOOK ACCOUNT.
"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>

    0 comments:

    Post a Comment

    Follow on Twitter

    Linkedin

    Categories

    Blog Archive

    Contact Form

    Name

    Email *

    Message *

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.