HTML Navigation Links
Learn to create navigation links with the <a>
tag to connect web pages.
Links in HTML
Links are the backbone of the web, connecting pages and resources. Let's learn how to create them using the anchor tag.
The <a> (Anchor) Element
The <a>
tag defines a hyperlink. The text or content between the opening <a>
tag and the closing </a>
tag becomes the visible, clickable part of the link.
The 'href' Attribute
The href
attribute is the most important part of the link. It specifies the destination URL (Hypertext Reference) where the link will take the user.
The 'target' Attribute
Use the target="_blank"
attribute to make the link open in a new browser tab or window. This is useful for external links to keep users on your site.
Practice Zone
Interactive Test 1: Drag & Drop
Arrastra en el orden correspondiente.
Arrastra las opciones:
Completa el código:
Interactive Test 2: Fill in the Blanks
Rellena los huecos en cada casilla.
<a target="_blank">Open Google in new tab</a>
Practice Example: Code Editor
Create a link to "https://wikipedia.org" with the text "Go to Wikipedia".