A link is text or an image on a webpage that takes you to a different webpage when you click it

Links are the connective tissue of the internet. When you see underlined text in blue, or sometimes another color, that is usually a link. You click it and your browser takes you somewhere else — another page on the same website, a completely different website, or sometimes a specific section within a page you are already reading.

Links can also be hidden inside images, buttons, or even plain text that does not look clickable at all. The only way to know for sure is to move your mouse over something and watch whether the cursor changes to a pointing hand. That hand cursor is your signal that clicking will do something.

The person or organization that created the webpage decides where each link goes. They write the link to point to a specific web address, called a URL. When you click, your browser reads that instruction and navigates to the URL.

Key Takeaways

  • Links are usually blue and underlined, but can be any color or hidden inside images, so look for the pointing-hand cursor to identify them.
  • Clicking a link sends you to a web address that the page creator chose, which might be another page on the same site or a completely different website.
  • You can see where a link goes before you click it by hovering your mouse over it and looking at the address shown in the bottom left corner of your browser.
  • Links from unfamiliar websites or that ask you to enter passwords should be treated with caution, since they could lead to phishing pages designed to steal your information.

How to identify a link before you click it

The safest habit is to check where a link actually goes before you click. In most web browsers, when you hover your mouse over a link without clicking, the bottom left corner of your screen shows you the web address the link points to. This takes a second and can save you from accidentally landing on a malicious website.

Be especially careful with links in emails, text messages, or social media posts. Scammers often create links that look like they go to a trusted website — like your bank or PayPal — but actually go to a fake page designed to steal your login information. This is called phishing. If you receive an unexpected message asking you to click a link and log in, do not click. Instead, go directly to the official website by typing the address into your browser yourself.

Links that come from people you know are generally safer, but not always. If a friend sends you a link that seems strange or out of character, ask them about it before clicking. Their account might have been hacked.

The difference between internal and external links

An internal link takes you to a different page on the same website. For example, a link on the Housing Basics homepage that takes you to an article about renter rights is an internal link. These are usually safe because they stay within a website you have already decided to visit.

An external link takes you to a completely different website. A link on a Housing Basics article that points to your city's housing authority website is an external link. External links are not inherently dangerous, but they do take you away from the original site, so pay attention to where you are going.

You can usually tell the difference by looking at the web address in the bottom left corner when you hover over the link. If the address starts with the same domain name as the page you are on, it is internal. If it starts with a different domain name, it is external.

How links work technically

Behind the scenes, a link is written in code called HTML. The code looks something like this: <a href="https://www.example.com">Click here</a>. The part that says "href" tells the browser where to go. The text between the tags — in this case "Click here" — is what you actually see and click on the page.

The web address inside the href can be a complete URL like "https://www.example.com", or it can be a relative path like "/housing-guide" that points to another page on the same website. It can also include an anchor, which is a # symbol followed by a word, like "#section-2". An anchor link takes you to a specific section within a page rather than the top of the page.

When you click a link, your browser reads this code and sends a request to the web server at that address. The server sends back the webpage, and your browser displays it. All of this usually happens in less than a second.

Links that open in a new tab or window

Some links are set up to open in a new browser tab instead of replacing the page you are currently viewing. You can usually tell this is going to happen if you right-click the link and see an option that says "Open link in new tab" — that option would not appear if the link was not designed to do that.

You can also force any link to open in a new tab by right-clicking it and selecting "Open link in new tab" yourself, even if the page creator did not set it up that way. This is useful when you want to keep reading the current page and explore the link later.

What to do if a link is broken

A broken link is a link that points to a webpage that no longer exists. When you click it, you usually see an error message like "404 Not Found" or "This page could not be found." This happens when a website removes or moves a page and does not update the links that point to it.

Broken links are frustrating but not dangerous. If you encounter one, you can try going to the main website and searching for the information you were looking for. You can also try removing the last part of the web address and going to the parent page — for example, if the link was "example.com/housing/guide/section-2" and that does not work, try "example.com/housing/guide" or "example.com/housing".

If you find a broken link on a website you use regularly, many sites have a way to report it. Look for a "Contact Us" link or a feedback form.

Links and your privacy

When you click a link, the website you came from can see that you clicked it. This information is called a referrer. If you click a link from a news article to a medical website, the medical website knows you came from that news article. Most websites use this information to understand how people find them, but it is worth knowing that some of your browsing behavior is visible this way.

If you want to click a link without the destination website knowing where you came from, you can use your browser's private or incognito mode. You can also right-click a link and look for an option like "Open link in private window" or "Open link in incognito window".

Frequently Asked Questions

How do I know if a link is safe to click?

Hover your mouse over the link and look at the web address shown in the bottom left corner of your browser. If it matches the website you expect, it is probably safe. Be cautious with links from emails or messages asking you to log in — go directly to the official website instead of clicking the link.

Can I get a virus from clicking a link?

Clicking a link itself does not install a virus. However, a link can take you to a website that tries to trick you into downloading malware or entering your passwords. The danger is not the click — it is what happens after you arrive at the destination page.

What does it mean when a link is underlined?

Underlining is a visual convention that signals "this is clickable." Most web browsers underline links by default, but website creators can change the color or remove the underline. The pointing-hand cursor is a more reliable indicator that something is a link.

Can I see all the links on a page at once?

Yes. In most browsers, you can press Ctrl+F (or Cmd+F on Mac) to open a search box and type "http" to highlight all the links on the page. You can also right-click and look for an option like "Inspect" to see the HTML code, which shows every link on the page.

What is the difference between a link and a bookmark?

A link is something on a webpage that takes you somewhere when you click it. A bookmark is something you save in your browser so you can return to a page later without having to search for it. You create a bookmark by clicking a star icon or using Ctrl+D (or Cmd+D on Mac).