The simplest way to link to a website
A link to a website is just text or an image that, when clicked, takes someone to a web address. You create one by wrapping the text you want to be clickable in an HTML tag called anchor, then telling it where to go.
The basic structure is always the same: you write <a href="https://example.com">Click here</a>. The part in quotes after href= is the web address. The text between the opening and closing tags is what people see and click on. That's it — that's a working link.
If you're writing in a word processor or content management system like WordPress, Google Docs, or Medium, you don't need to write HTML at all. You highlight the text you want to turn into a link, click a button (usually labeled "Link" or showing a chain icon), paste the web address into the box that appears, and you're done. The software writes the HTML for you.
Key Takeaways
- A link is created by putting text inside an anchor tag with an href attribute that contains the full web address, starting with https://.
- Most writing tools — WordPress, Google Docs, Medium, email clients — have a button to create links without writing HTML yourself.
- The text you make clickable should tell readers where the link goes or why they should click it, not just say "click here".
- Always use the full web address including https://, not just example.com, to avoid broken links.
Creating links in common tools without HTML
If you're writing in WordPress, highlight the text you want to link, then click the link icon in the toolbar (it looks like a chain). A box will appear where you can paste the web address. You can also type the address and WordPress will search for matching pages on your site. Press Enter or click the arrow to confirm.
In Google Docs, highlight your text, then press Ctrl+K on Windows or Cmd+K on Mac. A small box appears where you paste the web address. Click "Apply" and the link is live. You can test it by holding Ctrl (or Cmd) and clicking it.
In Gmail or Outlook, the process is the same: highlight text, use the keyboard shortcut or click the link button, paste the address, and confirm. Email clients will automatically turn bare web addresses (like https://example.com) into clickable links even if you don't wrap them in a link tag.
On social media platforms like Facebook, Twitter, or LinkedIn, you usually just paste a web address into your post and the platform automatically makes it clickable. You don't need to do anything extra. Some platforms will also pull in a preview image and headline from that page.
Writing the HTML if you're coding by hand
If you're writing HTML directly — in a text editor, a code block, or a website builder that shows you the code — the structure is always <a href="URL">text</a>. Replace URL with the full web address and text with what you want people to see.
Here are real examples:
- <a href="https://www.google.com">Search the web</a> creates a link that says "Search the web" and goes to Google.
- <a href="https://example.com/about">Learn about us</a> links to a specific page on a website, not just the homepage.
- <a href="https://example.com/document.pdf">Download the report</a> links to a PDF file.
Always include https:// at the start of the address. If you leave it out, the browser may treat it as a relative link (a page on the same website) instead of going to the address you intended.
Making your link text clear and useful
The text you make clickable matters. "Click here" tells readers nothing about where they're going. "Learn about our privacy policy" or "Read the full article" tells them exactly what to expect.
This is especially important for people using screen readers, which read the link text aloud. If every link on your page says "click here", someone listening won't know which one to choose. Descriptive link text also helps with search engines, which use it to understand what the linked page is about.
Good link text is usually a noun phrase or a short sentence: "Our pricing page", "How to reset your password", "Download the user guide", "Contact support". It should be specific enough that someone could understand the link's purpose without reading the surrounding text.
Linking to different types of pages and files
A link works the same way whether you're pointing to a homepage, a specific article, a PDF, an image, or a video. The address just changes. Here's what different links look like:
| What you're linking to | Example address |
|---|---|
| A website homepage | https://example.com |
| A specific page or article | https://example.com/blog/article-title |
| A PDF or document | https://example.com/files/report.pdf |
| An image | https://example.com/images/photo.jpg |
| A video on YouTube | https://www.youtube.com/watch?v=VIDEO_ID |
| An email address | mailto:person@example.com |
For email links, use mailto: instead of https://. When someone clicks <a href="mailto:contact@example.com">Email us</a>, their email client opens with a new message ready to send to that address.
Testing your links and fixing broken ones
After you create a link, test it by clicking it (or holding Ctrl and clicking if you're editing). Make sure it goes to the right place and loads correctly. A broken link either goes nowhere, shows a 404 error, or takes you to the wrong page.
Broken links usually happen because the web address changed, the page was deleted, or you made a typo. If you're linking to someone else's website and their page moves, your link will break. There's nothing you can do about that except update it when you notice.
If you're linking to pages on your own website, keep the addresses consistent. If you move a page or change its URL, update all the links pointing to it, or set up a redirect so the old address still works.
Linking to a specific section within a page
You can link not just to a page, but to a specific heading or section on that page. This requires the page to have an anchor — a marker that labels a section. Many websites already have these built in.
To link to a section, add a hash symbol and the section name to the end of the address: <a href="https://example.com/article#pricing">See our pricing</a>. When someone clicks this link, the page loads and automatically scrolls to the section labeled "pricing".
Not every website supports this. You can test it by going to a page, looking for a heading you want to link to, right-clicking it, and seeing if there's an option to "copy link to heading" or similar. If there is, the site supports section links. If not, you can only link to the whole page.
Frequently Asked Questions
Do I need to write HTML to create a link?
No. If you're using WordPress, Google Docs, email, or social media, there's a button or keyboard shortcut to create links without touching HTML. Only use HTML if you're coding a website directly or working in a tool that requires it.
What's the difference between http and https?
HTTPS is encrypted and secure; HTTP is not. Always use HTTPS when you have the choice. Most modern websites use HTTPS by default. If you copy a web address from your browser's address bar, it will include the right protocol automatically.
Can I link to a file on my computer instead of a website?
Not reliably. Links need a web address that starts with https:// or http://. If you try to link to a file on your hard drive, it won't work for anyone else viewing your page. Upload the file to a web server first, then link to it there.
What happens if I link to a website and it goes offline later?
Your link will break and show an error when clicked. You can't prevent this, but you can check your links occasionally and update or remove ones that no longer work. Some tools can monitor your links and alert you when they break.
Can I make an image into a link?
Yes. Instead of putting text between the anchor tags, put an image tag: <a href="https://example.com"><img src="image.jpg"></a>. When someone clicks the image, they go to the linked address. Most website builders let you do this by clicking a link button while an image is selected.