HTML Links Summary

Web links in HTML are called ‘anchors’ and they let users click on text, images, or other elements and navigate to other web pages or parts of the page their are on.

<a>Link Text</a>


The most important attribute of an anchor is the ‘href’ which stand for hypertext reference. This is where the link will take you when you click on it.

<a href="">Link Text</a>


Another attribute you will often use is called the ‘target.’ This lets you tell the browser to open a new tab when the user clicks the link rather than changing the address of the current tab.

The default setting is ‘self.’ To have links open a new tab the setting should be ‘blank.’ (Unfortunately, this will not work in the Code Sandbox.)

<a href="" target="blank">Link Text</a>

Code Sandbox