A hyperlink is text or an image on a webpage that takes you to another location when you click it

A hyperlink (often called a "link") is the clickable element that connects one webpage to another, or to a different part of the same page. When you see underlined text in blue, or any text or image that changes your cursor to a pointing hand when you hover over it, that is a hyperlink. Clicking it sends your browser to a new web address.

The web itself was built on hyperlinks. Without them, webpages would be isolated documents with no way to move between them. Every time you click a link to read a news article, visit a store, or jump to a different section of a long page, you are using a hyperlink.

Key Takeaways

  • A hyperlink is any clickable text or image that takes you to a different webpage or a different part of the current page.
  • Hyperlinks are created using HTML code, specifically the anchor tag <a>, which tells the browser where to send you when clicked.
  • The web address a link points to is called the URL, and it can be absolute (a full web address) or relative (a path within the same website).
  • You can see where a link will take you by hovering over it or right-clicking to view its destination before you click.

How hyperlinks work under the hood

When a web developer creates a hyperlink, they use HTML code called an anchor tag. The tag looks like this: <a href="https://example.com">Click here</a>. The href part (which stands for "hypertext reference") contains the web address, and the text between the opening and closing tags is what you see on the page.

When you click the link, your browser reads the href value and navigates to that address. The browser then loads the new page and displays it. If the link points to a location on the same page (called an anchor), the browser scrolls to that spot instead of loading a new page.

The web address in a hyperlink can be written two ways. An absolute URL is the complete web address, like https://www.example.com/articles/about. A relative URL is a shorter path used when linking within the same website, like /articles/about or ../images/photo.jpg. Relative links are faster to type and work even if the website moves to a different domain.

Different types of hyperlinks and what they do

Most hyperlinks take you to a different webpage, but hyperlinks can point to many things. A link can open a PDF file, start an email to an address, download a file, or jump to a specific section of the current page. A link that starts with mailto: opens your email program, and a link that starts with tel: can dial a phone number on mobile devices.

Links can also be styled in different ways. Some are underlined and blue (the traditional style), while others are buttons, images, or plain text in a different color. A well-designed website makes it clear which elements are clickable, usually through color, underlining, or a change in the cursor when you hover over them.

How to tell where a link will take you before clicking

Before you click a link, you can see its destination without actually going there. In most browsers, hover your mouse over the link and look at the bottom left corner of the window — the URL will appear there. This is useful for checking whether a link is legitimate or whether it goes where you expect.

You can also right-click a link and select "Copy link address" or "Open link in new tab" to see the URL in your address bar or to open it without leaving your current page. On mobile devices, press and hold the link to see a menu with options.

Why hyperlinks matter for web navigation

Hyperlinks are the foundation of how people move through the web. Without them, every webpage would be a dead end. Search engines like Google use hyperlinks to discover new pages and to understand how pages relate to each other. Websites use internal links (links to other pages on the same site) to help visitors find information and to guide them toward important pages.

The number and quality of hyperlinks pointing to a webpage also affect how high it ranks in search results. A page that many other websites link to is seen as more important or trustworthy. This is why websites care about building links and why link-building is a core part of search engine optimization.

Common hyperlink problems and how to fix them

A broken link is a hyperlink that points to a page that no longer exists. When you click it, you see a "404 Not Found" error. Broken links happen when a website removes or moves a page without updating the links that point to it. Web developers use tools to scan for broken links and fix them by updating the href value to point to the correct page or to a new location.

Another issue is a link that points to the wrong page entirely, usually because the URL was typed incorrectly when the link was created. This is why testing links before publishing a website is important. Some links may also load slowly if the destination server is slow or if your internet connection is poor.

Frequently Asked Questions

Can a hyperlink be something other than text?

Yes. Any image, button, or other element on a webpage can be a hyperlink. The HTML anchor tag wraps around whatever you want to be clickable — text, an image, a button, or even a combination of elements. The cursor will change to a pointing hand when you hover over any clickable element.

What is the difference between a hyperlink and a URL?

A URL is the web address itself (like https://www.example.com). A hyperlink is the clickable element that contains that URL. The hyperlink is what you see and click on the page; the URL is the destination address hidden in the code.

Why do some links open in a new tab instead of replacing the current page?

Web developers can add code to a link that tells the browser to open it in a new tab or window instead of replacing the current page. This is done with the target="_blank" attribute in the anchor tag. It keeps the original page open so you can return to it without using the back button.

Is it safe to click a link if I do not recognize the URL?

It depends on the source. If a link came from a trusted website or person, it is usually safe. If it came from an unknown email, text message, or pop-up, be cautious. Hover over the link to see where it actually goes before clicking. Malicious links sometimes use text that says one thing but point to a different address.