HTML Links

HTML Links

Last Updated Jul 21, 2015, 12:00:06 PM

Hyperlinks are the fundamental idea that makes the web great. They allow pages to be linked together so that it's easy to navigate through the sea of information.

Definition and Usage

Content categories flow content, heading content, palpable content
Permitted content Phrasing content
Tag omission The start tag is mandatory
Permitted parent element Any elements
DOM Interface HTML Heading Element


The html links are created using the a attribute.

Watch GIF Try It Now


The a tag attribute is used to start the HTML link

The href attribute specifies the destination address (

The link text is the visible part

HTML Links - The target Attribute

The target attribute specifies where to open the linked document.


Open Link in New Window

Try It Now


Open the linked document in the same frame

Try It Now


Opens the linked document in the parent frame

Try It Now


Opens the linked document in the full body of the window

Try It Now

HTML Links with Titles

Title tags in links are used to display more description about that link

Try It Now

HTML Links As Images

If you want to make an image work as a link, the method is exactly the same as with texts. You simply place the <a href> and the </a> tags on each side of the image.

Try It Now

Browser Support
Links (Yes) (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

Practice with Our Interactive Live Code Editor and Take your HTML Skills to the next level

Exercise 1 Exercise 2 Exercise 3 Exercise 4 Exercise 5

Sources and Credits

The source of the content has been referred and updated with Mozilla Foundation and w3C

Last Updated Jul 21, 2015, 12:00:06 PM