HTML links are also known as hyperlinks. When we click on particular links on web pages, they open other web pages. A link does not have to be a text—it can be an image or any other HTML element. It is an integral part of HTML and it is used everywhere.

An HTML link is used to link other web pages to a document. When users click on links on web pages, they are brought to other web pages or websites. An HTML document contains many links, which are also known as hyperlinks. Web developers can link from the text, images, and other types of media.Links are specified in HTML using <a> tags.

<a href=”url” > Text Link </a>

The href attribute is used to specify the link’s destination.

The test link is the visible part of the link.

html-link

This will produce the following result—when you click on the link, it will take you to the Simplilearn homepage.

output-html-link

Here's How to Land a Top Software Developer Job

Full Stack Developer - MERN StackExplore Program
Here's How to Land a Top Software Developer Job

The target attribute of HTML links specifies where to open the linked document. The following are possible options:

_blank

Opens the linked document in a new window or tab

_self

Opens the linked document in the same window or tab

_parent

Opens the document in the parent frame

_top

Opens the linked document in the full body of the window

target-attribute

This will produce the following result. Click on the links to see the difference.

output-target-attribute

You can also link an image to another web page. To do this, put the <img> tag inside an <a> tag.

image-as-link.

This will produce the following result:

output-image-as-link

When you click on the image, you will be directed to the Simplilearn website.

By default, links will appear as follows:

  • An unvisited link will be underlined and blue
  • A visited link is underlined and purple
  • An active link is underlined and red

With CSS, web developers have the option of customizing these link colors.

link-colors-html-links

You can create a link on your web page, which will navigate the user to their system’s default email program using mailto: inside the href attribute.

<a href="mailto:someone@example.com">Send email</a>

When you will click on the “send email” link, you will be directed to your email account.

output-mailto

Get skilled in HTML5 and CSS3 with the Full Stack Java Developer Master's Program. Click to check out the program details!

Would You Like to Become a Full-Stack Developer?

Our brief introduction to HTML links covered the basics when it comes to creating and customizing website hyperlinks. We discussed several ways in which we can manipulate the properties of hyperlinks with CSS and coding. When it comes to learning HTML, however, this is just the tip of the iceberg. If you’re serious about taking the next step to advancing your career, certification is highly recommended in today’s competitive job market. Simplilearn’s Full Stack Java Developer course is a comprehensive program that will teach you everything you need to know to master web development Upon completion, students also earn their certifications, which can help them gain an edge over the competition.

If you’re an aspiring web and mobile developer, HTML training will broaden your skills and career opportunities. 

Do you have any questions for us? Please leave them in the comments section, and we'll have our experts answer them for you.

Our Software Development Courses Duration And Fees

Software Development Course typically range from a few weeks to several months, with fees varying based on program and institution.

Program NameDurationFees
Caltech Coding Bootcamp

Cohort Starts: 24 Feb, 2025

6 Months$ 8,000
Automation Test Engineer Masters Program

Cohort Starts: 8 Jan, 2025

8 months$ 1,499
Full Stack Java Developer Masters Program

Cohort Starts: 8 Jan, 2025

7 months$ 1,449
Full Stack (MERN Stack) Developer Masters Program

Cohort Starts: 8 Jan, 2025

6 Months$ 1,449