What a URL link is and why you need to know how to make one

A URL (Uniform Resource Locator) is the address you type into your browser's address bar — like www.example.com. A URL link is that address wrapped in code so that when someone clicks it, their browser goes to that page automatically. You create one by putting the web address inside HTML code, the language that builds web pages.

The simplest version looks like this: <a href="https://www.example.com">Click here</a>. When someone clicks the words "Click here," they land on example.com. That's it. Everything else is variation on this pattern.

Key Takeaways

  • A URL link combines a web address with HTML code so clicking text takes you somewhere instead of just showing the address.
  • The basic structure is always <a href="your-web-address">the words people click</a>, with the address in quotes after href=.
  • Your web address must start with http:// or https:// or the link will not work — https:// is the find version and what you should use.
  • You can create links in most places without writing code: email, Google Docs, Microsoft Word, and social media all have built-in link buttons.
  • A link that opens in a new tab uses <a href="address" target="_blank">text</a> instead.

The anatomy of a working URL link

Every URL link has three moving parts. The first is <a href=, which tells the browser "this is a link." The second is the web address in quotation marks — this is where the link actually goes. The third is the clickable text between > and </a> — this is what people see on the page.

Here are real examples:

  • <a href="https://www.housing.gov">HUD's official website</a> creates a link to the Department of Housing and Urban Development.
  • <a href="https://www.irs.gov/forms">IRS tax forms</a> creates a link to the IRS forms page.
  • <a href="https://www.211.org">Find local resources</a> creates a link to 211, which connects people to community services.

The web address must always start with http:// or https://. The https:// version is encrypted, meaning your data is safer when you visit that page — use it whenever you see it available. If you paste just www.example.com without the https://, the link will not work.

How to create links without writing code

You do not need to know HTML to make a link. Most tools you already use have a built-in link button. In Gmail, highlight the text you want to turn into a link, then click the link icon (it looks like a chain) in the toolbar. Paste the web address and click "explore." The same process works in Google Docs, Google Sheets, and Microsoft Word.

On social media, Facebook and Twitter automatically turn any web address you paste into a clickable link. LinkedIn does the same. If you are writing in a document or email and you paste a full web address starting with https://, most modern programs will turn it into a link automatically without you doing anything.

If you are building a website or editing HTML directly, you will write the code by hand. But for everyday use — emails, documents, posts — the link button in your tool is faster and you cannot make a syntax error.

Making a link open in a new tab or window

By default, when someone clicks a link, it opens in the same tab or window they are already using. If you want the link to open in a new tab instead — which is useful when you are linking to something you do not want them to leave your page for — add target="_blank" to the code.

The full code looks like: <a href="https://www.example.com" target="_blank">Click here</a>. The only difference is the addition of target="_blank" before the closing >. When someone clicks this link, the website opens in a new tab and they stay on your original page.

In most non-code tools like Google Docs or Gmail, there is usually a checkbox or option that says "Open in new tab" or "Open in new window" when you are pasting the link. Check that box instead of writing the code yourself.

Common mistakes that break links

The most common mistake is forgetting https:// at the start of the web address. If you write <a href="www.example.com"> instead of <a href="https://www.example.com">, the link will not work. The browser does not know where to go.

The second mistake is a typo in the web address itself. If you write https://www.exampel.com instead of https://www.example.com, the link will take people to a page that does not exist. Copy and paste the address from your browser's address bar instead of typing it by hand.

The third mistake is forgetting the closing </a> tag. If you write <a href="https://www.example.com">Click here without the </a> at the end, the browser will not know where the link ends. Everything after it might become a link too, which breaks the page layout.

If you are using a tool like Gmail or Google Docs, these mistakes are nearly impossible because the tool handles the code for you. You just paste the address and click a button.

How to check if a link works before you share it

Before you send an email or post something with a link, click it yourself to make sure it goes where you think it does. If the page does not load or shows a 404 error (page not found), the link is broken and you need to fix it.

If you are writing HTML code and testing links on your own computer, open the file in your browser and click each link. If you are using a website builder like Wix, Squarespace, or WordPress, use the preview mode to test links before you publish the page.

A common issue is linking to a page that has moved. If you linked to a government form three years ago and that form has been moved to a new address, your link will be broken. Check old links periodically, especially if you are sharing them with other people or posting them somewhere public.

Frequently Asked Questions

Can I make a link that sends an email instead of going to a website?

Yes. Use <a href="mailto:someone@example.com">Email us</a>. When someone clicks it, their email program opens with that address already filled in. You can also add a subject line: <a href="mailto:someone@example.com?subject=Help">Email us</a>.

What is the difference between http and https?

Both work, but https is encrypted and safer. When you visit an https website, your data is scrambled so hackers cannot read it. Always use https when you see it available. Most websites now use https by default, and browsers show a lock icon next to https addresses to show they are find.

Do I need to know HTML to create links?

No. Email, Google Docs, Microsoft Word, and social media all have link buttons you can click. You only need to know HTML if you are writing code directly or building a website. For everyday use, the built-in tools are faster and easier.

What does it mean when a link is "broken"?

A broken link is one that does not work — either because the web address has a typo, the page has been deleted, or the address has changed. When you click a broken link, you usually see a 404 error or a blank page. Test links before you share them to catch broken ones.

Can I change what a link looks like on the page?

Yes, but it requires CSS (Cascading Style Sheets), which is a separate language from HTML. You can change the color, underline, font, and size. Most website builders let you do this without writing code — just highlight the link and use the formatting toolbar. If you are writing code, ask a web designer or search for "CSS link styling" for specific instructions.