The display text and the URL are separate things you can change independently
When you create a hyperlink in HTML, you are writing two pieces of information: the URL that the browser actually goes to (the href attribute) and the text that appears on the page (the link text). You can change the display text without touching the URL, change the URL without touching the text, or change both. The browser only follows the href — the visible text is purely for the reader.
This matters because a link that says "click here" tells the reader nothing about where it goes, while a link that says "Housing and Urban Development office locations" does. Search engines also read link text to understand what a page is about, so descriptive text helps both people and automated tools.
Key Takeaways
- The link text (what readers see) and the href attribute (where the browser goes) are separate — you can change one without touching the other.
- In HTML, link text goes between the opening and closing <a> tags, while the URL goes in the href attribute.
- Most visual editors let you right-click a link and choose "Edit link" or "Link properties" to change the text without rewriting the code.
- If you change the text in a visual editor and the link breaks, you likely edited the href by mistake — undo and try again through the link dialog.
Changing link text in HTML code
If you are writing HTML directly, the link text is the part between <a> and </a>. The URL lives in the href attribute inside the opening tag. To change only the text, leave the href alone and replace what is between the tags.
Original link:
<a href="https://www.hud.gov/program_offices/public_indian_housing">HUD housing programs</a>
If you want the text to say something different but keep the same URL, change only what is between the tags:
<a href="https://www.hud.gov/program_offices/public_indian_housing">Find HUD housing programs</a>
The href stays exactly the same. The browser will still go to the same place when someone clicks, but the reader now sees "Find HUD housing programs" instead of "HUD housing programs".
Changing link text in visual editors (Word, Google Docs, Squarespace)
Most word processors and website builders do not show you the HTML code. Instead, you right-click the link and look for an option like "Edit link", "Link properties", or "Change link". This opens a dialog box with two separate fields: one for the display text and one for the URL.
In Microsoft Word, right-click the link and choose "Edit Link". You will see the URL in one field and the display text in another. Change only the display text field, then click OK. In Google Docs, right-click and choose "Edit link" — the dialog shows the URL at the top and the text below it. In Squarespace or Wix, click the link, then look for a pencil icon or "Edit" button that opens the link settings.
The key is to use the link dialog rather than clicking into the text and typing. If you just click and type, you might accidentally edit the URL instead of the text, or you might break the link entirely. The dialog keeps the two pieces separate so you cannot mix them up.
Changing the URL while keeping the text the same
The reverse is also common: you have a link that says the right thing, but it points to the wrong page. Use the same method — right-click and choose "Edit link" — but this time change only the URL field. Leave the display text alone.
This is useful when a page moves to a new address but you want readers to see the same link text. For example, if a government office reorganizes and its page moves from housing.example.gov/rentals to housing.example.gov/programs/rentals, you can update the href without changing what readers see on your page.
What happens if you edit the text directly without using the link dialog
If you click into a link and start typing to change the text, you are editing the HTML content, not the link properties. This usually works fine — you can delete the old text and type new text, and the link stays intact. But if you accidentally delete the closing </a> tag or the opening <a href="..."> tag, the link breaks.
The safest approach is to always use the link dialog (right-click, "Edit link") rather than clicking into the text and typing. If you do edit the text directly and the link stops working, undo your changes and use the dialog instead. Most editors have an undo button or Ctrl+Z (Windows) and Command+Z (Mac).
Keeping link text descriptive and specific
Search engines and screen readers (tools that read web pages aloud for people who are blind or have low vision) both rely on link text to understand what a link is about. A link that says "click here" or "more information" tells them nothing. A link that says "explore for emergency rental information" or "View the lease agreement template" tells them exactly what they will find.
When you change link text, aim for a phrase that would make sense even if someone saw only that text and nothing around it. "Learn about the eviction process" is better than "Learn more". "read the tenant rights guide" is better than "read". This helps both people using screen readers and people scanning a page quickly.
Frequently Asked Questions
Can I change link text without changing where it goes?
Yes. The display text and the URL are separate. Use the link dialog (right-click, "Edit link") to change only the text field, leaving the href field alone. The link will go to the same place but show different text to the reader.
What if I edit the text and the link breaks?
You likely deleted part of the HTML tag by accident. Undo your changes (Ctrl+Z or Command+Z) and use the link dialog instead of clicking and typing directly into the text. The dialog keeps the URL and text separate so you cannot break the link.
Does changing link text affect SEO or how search engines see the page?
Yes. Search engines read link text to understand what a page is about. Descriptive link text like "Housing authority contact information" helps search engines more than generic text like "Click here". Changing text to be more specific and descriptive is a good practice.
Can I have the same link text point to different URLs on the same page?
Yes. Each link is independent. You can have five links that all say "Learn more" but point to five different pages. However, this is confusing for readers and for screen readers, so it is better to make each link text unique and descriptive.