Advertisement

Google Ad Slot: content-top

Links Hyperlinks

~1 min read · HTML
On this page

In HTML, hyperlinks are created using the <a> (anchor) tag. Hyperlinks are fundamental to the web, allowing users to navigate between different pages, sections of the same page, or even to trigger downloads or open email clients.

Syntax

<a href="url">link</a>

Example 1 : Link to Another Web Page
Try it yourself
Example 2 : Link to a Section of the Same Page (Anchor Link)
Go to Section 1

Section 1

This is the content of Section 1.

Try it yourself
Example 3 : Link to an Email Address and Download
Try it yourself

Target Attribute

Attribute
Description
_blank
Opens in a new tab or window.
_self
Opens in the same tab or window (default).
_parent
Opens in the parent frame.
_top
Opens in the full body of the window.

Note

title: Provides additional information about the link, usually displayed as a tooltip when hovering over the link.