A link is text or an image that points to another page or file
When you click a link, your browser or process takes you somewhere else — another website, a different page on the same site, a document on your computer, or an email address. To make a link, you need three things: the destination (the web address or file path), the text or image that people will click on, and the tool you are using to create it.
The process changes depending on whether you are working in a word processor like Microsoft Word, a website builder, an email program, or a plain text editor. But the core idea stays the same: you select what you want to be clickable, then tell your tool where it should go.
Key Takeaways
- A link needs a destination (URL or file path), clickable text or image, and a tool to connect them together.
- In Microsoft Word, Google Docs, and most word processors, you highlight text, right-click, and choose "Link" or use Ctrl+K (Windows) or Cmd+K (Mac).
- On websites, links are created with HTML code: <a href="destination">clickable text</a>, but most website builders let you do this without typing code.
- The destination can be a full web address (https://example.com), a relative path to a file on the same site (/about), or a file on your computer (C:\Documents\filename.pdf).
- Test every link after you create it to make sure it goes where you intended and does not lead to a broken page or missing file.
Creating links in Microsoft Word and Google Docs
In Microsoft Word, highlight the text you want to turn into a link. Then press Ctrl+K on Windows or Cmd+K on a Mac. A dialog box will open asking for the destination. Type or paste the web address (for example, https://www.example.com) and click OK. The text will turn blue and underlined, showing it is now a link.
Google Docs works almost the same way. Highlight your text, press Ctrl+K or Cmd+K, and a small popup will appear. Type the destination URL and press Enter. You can also link to other Google Docs you own, or to a heading within the same document — Google Docs will show you a list of headings to choose from.
If you want to change where a link points after you create it, right-click the link and select "Edit Link" (Word) or click the link and edit the URL in the popup (Google Docs). To remove a link entirely, right-click it and choose "Remove Link".
Creating links in email programs
In Gmail, Outlook, and most email programs, the process is the same as in word processors. Highlight the text you want to link, then press Ctrl+K or Cmd+K. A dialog box will appear. Type the destination and press Enter or click OK.
One important difference: email programs sometimes automatically turn web addresses into links for you. If you type https://www.example.com in the body of an email, many programs will recognize it and make it clickable without you having to do anything. You can still highlight text and manually create a link if you want the clickable text to say something different from the actual web address.
Creating links on websites and in HTML
If you are building a website using a visual editor (like Wix, Squarespace, or WordPress with a block editor), the process is similar to Word or Google Docs. You highlight text, click a link button in the toolbar, and enter the destination. The editor handles the HTML code for you.
If you are writing HTML directly, a link looks like this: <a href="https://www.example.com">Click here</a>. The href attribute tells the browser where to go. The text between the opening and closing tags is what people see and click on. You can also link to images: <a href="destination"><img src="image.jpg"></a> makes an image clickable.
On your own website, you can use relative paths instead of full web addresses. If you have a file called about.html in the same folder as your current page, you can link to it with <a href="about.html">About Us</a>. If the file is in a subfolder called pages, use <a href="pages/about.html">About Us</a>. This makes it easier to move your whole site to a different location without breaking all your links.
Linking to files on your computer or network
If you want a link to open a PDF, Word document, or other file stored on your computer, the destination needs to be a file path instead of a web address. On Windows, this looks like C:\Users\YourName\Documents\filename.pdf. On a Mac, it looks like /Users/YourName/Documents/filename.pdf.
In Word or Google Docs, you can often browse for the file instead of typing the path. Click the link dialog, look for a "Browse" or "File" button, and navigate to the file you want. The program will fill in the path for you.
Be aware that file links work differently depending on where the document lives. If you email a Word document to someone else, links to files on your computer will not work for them — they will not have access to your hard drive. If you want to share a document with links to files, either include the files in the email, upload everything to a shared folder like Google Drive or OneDrive, or convert the links to web addresses.
Making links open in a new tab or window
By default, a link opens in the same tab or window where the reader clicked it. If you want the link to open in a new tab instead, you can change that setting.
In Word and Google Docs, open the link dialog and look for an option that says "Open in new window" or "Open in new tab". Check that box and save the link.
In HTML, add target="_blank" to the link tag: <a href="https://www.example.com" target="_blank">Click here</a>. This tells the browser to open the destination in a new tab. Some website builders have a checkbox for this instead of requiring you to type code.
Testing and fixing broken links
After you create a link, click it to make sure it goes where you intended. A broken link — one that points to a page that no longer exists, a file that has been moved, or a web address with a typo — will show an error message instead of loading the destination.
If a link is broken, right-click it (or use your tool's edit function) and check the destination. Common problems include typos in the web address, a file that has been moved or deleted, or a relative path that no longer matches the folder structure. Fix the destination and test again.
If you are managing a website with many links, consider using a link checker tool. These programs crawl your site and report which links are broken, saving you from having to click every one manually. Many website builders and content management systems have link checkers built in.
Frequently Asked Questions
Can I make a link that sends an email when someone clicks it?
Yes. In Word or Google Docs, open the link dialog and look for an option to link to an email address. Type the email address and save. In HTML, use <a href="mailto:person@example.com">Email us</a>. When someone clicks this link, their default email program will open with that address in the "To" field.
What is the difference between a relative link and an absolute link?
An absolute link includes the full web address: https://www.example.com/about. A relative link only includes the path from your current location: /about or about.html. Relative links work only within your own website. Absolute links work anywhere and are safer if you are not sure where the document will be viewed from.
How do I link to a specific part of a page?
First, create a heading or add an anchor at the spot you want to link to. In HTML, use <a id="section-name"></a> or just add id="section-name" to a heading tag. Then link to it with <a href="#section-name">Jump to section</a>. In Google Docs, you can link to headings directly from the link dialog.
What happens if I move a file that other links point to?
Any link pointing to the old location will break. If you move a file on your website, update all the links that point to it, or set up a redirect so the old address automatically sends visitors to the new one. If you move a file on your computer, links in documents on your computer will break unless you update the file path.
Can I change what text appears when someone hovers over a link?
Yes, using a title attribute. In HTML, write <a href="destination" title="This text appears on hover">Click here</a>. In Word and Google Docs, right-click the link, look for "Edit Link" or similar, and find a field for "Tooltip" or "Title". This is useful for explaining where the link goes or providing extra context.