Header Ads Widget

Responsive Advertisement

Ticker

6/recent/ticker-posts

What is a link?

What is a link?

👉It is a connection from one web resource to another.

👉A link has two ends, An anchor and direction.

👉The link starts at the “source” anchor and points to the “destination” anchor, which may be any Web resource such as an image, a video clip, a sound bite, a program, an HTML document or an element within an HTML document.

👉You will find many websites or social media platforms ( Like YouTube, Instagram ) which link an image to a URL or a text to a URL etc. 

👉This basically means that by using the ‘a’ tag, you can link 1 element of the code to another element that may/may not be in your code. 

 HTML Links - The target Attribute  
 By default, the linked page will be displayed in the current browser window. To change this, you must specify another target for the link.  
 The target attribute specifies where to open the linked document.  
 The target attribute can have one of the following values:  
   _self - Default. Opens the document in the same window/tab as it was clicked  
   _blank - Opens the document in a new window or tab  
   _parent - Opens the document in the parent frame  
   _top - Opens the document in the full body of the window  
 <!DOCTYPE html>  
 <html>  
 <body>  
 <h3>Various options available in the Target Attribute</h3>  
 <p>If you set the target attribute to "_blank",  
 the link will open in a new browser window or tab.</p>  
 <a href="https://knpoints.blogspot.com" target="_blank">knpoints</a>  
 <p>If you set the target attribute to "_self",  
 the link will open in the same window or tab.</p>  
 <a href="https://knpoints.blogspot.com/" target="_self">knpoints</a>  
 <p>If you set the target attribute to "_top",  
 the link will open in the full body of the window.</p>  
 <a href="https://knpoints.blogspot.com/" target="_top">knpoints</a>  
 <p>If you set the target attribute to "_parent",  
 the link will open in the parent frame.</p>  
 <a href="https://knpoints.blogspot.com/" target="_parent">knpoints</a>  
 </body>  
 </html>  



Post a Comment

0 Comments