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:

<a href="https://todotutorial.com">Visit us</a>

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".

* Write the code below. Correct characters will be shown in green and incorrect ones in red.

<a href="https://wikipedia.org">Go to Wikipedia</a>

Knowledge Check

Which attribute specifies the destination URL of a link?