HTML a tag
HTML <a> tag defines hyperlink. hyperlink is the hypertext anchor that points the source (text link) to the destination source (other page or website). We can make a link to other websites or other web pages.
<a href="http://www.web4college.com">Go to web4college</a>
</>
Tag Uses
Specific uses of <a> tagText links
-
Text links are made by writting the text inside the <a> tags.
-
<a href="https://www.web4college.com" target="_blank">Here is text link</a>
Try</> Image links
-
Image links can be made by placing the image inside the <a> tags.
-
<a href="http://www.web4college.com"> <img src="/images/codingb-96x96.png"/> </a>
Try</> Email links
-
Email links are also possible. The email link directs the user to the respective email address.
-
<p>Email to: <a href="mailto:[email protected]" target="_blank">Becky.</a>
Try</>
Tag omission
Both opening and closing tags are necessary for the a element.
Global Attributes
All the global attributes are applicable on a element.
<br> tag breaks a line into multiple lines.
Next
Was this article helpful?