Anchor Tag - Hypertext Reference (href)
The href attribute defines reference that the link refers to.
Basically this is where the user will be taken if they wish to click this link.
Hypertext references can be Internal, Local, or Global.
• Internal - Links to anchors on the current page
• Local - Links to other pages within your domain
• Global - Links to other domains outside of your site
HTML - Text Links
Use the <a></a> tags to define the start and ending of an anchor.
Decide what type of href attribute you need and place this attribute
into the opening tag.
The text you place between the opening and closing tags will be
shown as the link on a page.
Use the demonstration below as a reference.
HTML Code:
Internal - href="#name"
Local - href="../pics/picturefile.jpg"
Global - href="http://www.safcode.com"
Global Link Example:
<a href="https://www.youtube.com/safcode" target="_blank">YouTube</a>
<a href="https://facebook.com/safcode3" target="_blank">Facebook</a>
<a href="https://www.instagram.com/safder.ali.202/" target="_blank">Instagram</a>
target attribute:
target="_blank" Opens new page in a new browser window
Global Link Output:
YouTube Facebook Instagram