Holla Tech-Learn

The <a> Tag

Links are also an integral part of every web page. You can add links to text or images that will enable the user to click on them in order to be directed to another file or webpage.
In HTML, links are defined using the <a> tag.

Use the href attribute to define the link’s destination address:

<a href=”> </a>
NOTE:
to link another image to another document, simply nest the <img> tag inside <a> tags.
This is box title
 


Creating Your First Link
 

<a href=”http://www.hollablog.com”> Learn HTML </a>
 

 Once the code has been saved, "Learn HTML" will disp;ay as a link. 

Learn HTML 

Clicking on "Learn HTML" redirects you to www.hollablog.com 

NOTE:
Links can be either absolute or relative. 

The Target Attribute

The target attribute specifies where to open the linked document. 

Giving a _blank value to your attribute will have the link open in a new window or new tab: 

<a href=”http://www.sololearn.com” target=”_blank”>
Learn Playing
</a>
NOTE:
A visited link is underlined and purple.

 

BACK NEXT

 


CLICK ON THE BUTTON BELOW TO GO TO THE HTML MAIN COURSE PAGE. 

HTML MAIN COURSE PAGE

 


© License: All Rights Reserved 


CONTACT HOLLA TECH – LEARN SUPPORT