A hyperlink, usually called a link, is an interactive reference to another webpage, file, email address or section of a document. Its link text or accessible name describes the destination, while a URL or fragment tells the browser where to navigate.
Hyperlinks make websites navigable and connect related information. Understanding their anatomy also helps you recognize suspicious URLs, write clearer documents and create accessible web pages.
What A Hyperlink Is And Why It Matters
A hyperlink, often shortened to link, is an interactive reference that lets a person move to a related resource or location. On a webpage, a link may open another page on the same site, take the reader to a different website, jump to a heading farther down the current page, or start another supported action such as preparing an email. Links are the connective tissue of the World Wide Web: they turn separate documents into a navigable collection.
A hyperlink has two sides. The reader encounters a visible or otherwise accessible control, and the browser associates that control with a destination. The visible text might say “Read the setup instructions” while the destination is a long URL. The words and the address should serve the same purpose. A link whose text promises a security guide but actually opens an unrelated website creates confusion and may be malicious.
Links are not limited to underlined blue words. An image, navigation icon, document entry or card can also function as a link if implemented properly. Styling varies by website and user settings. The underlying relationship between the interactive element and its target is what makes the element a hyperlink, not the color of the letters.
The World Wide Web relies on HTML documents, URLs and transfer protocols such as HTTP and HTTPS. MDN’s explanation of hyperlinks places links among the Web’s foundational ideas. Their purpose is to connect material in a way that is easy to follow, not merely to decorate pages.
A well-designed page should let people understand where a link will lead before they activate it. Readers using a keyboard or screen reader need that clarity just as much as people using a mouse. Understanding how links work helps you browse safely, write better documents and build websites with useful navigation.
Our guide to web browsers explains how a browser opens linked content after a user follows a destination. A hyperlink is the reference; a browser and network perform the requested navigation.
Understand Link Text, Destination And Activation
Consider a sentence that reads, “See the full troubleshooting checklist.” The words “troubleshooting checklist” might be linked to a separate article. The visible phrase is called the link text or accessible name in many contexts. The destination is represented by a URL or another reference. A mouse click, touch tap or keyboard activation requests navigation to that target.
In standard HTML, an anchor element with an href attribute normally creates a hyperlink. The element’s content provides its visible or accessible label. For example, a document author could use an anchor whose href points to a troubleshooting page, and whose text describes the relevant instructions. Browsers then display it as an interactive element.
| Link Element | Purpose | Example |
|---|---|---|
| Link text | Describes destination | Windows Setup Guide |
| Target URL | Identifies resource | https://example.com/guide |
| Scheme | Identifies resource access type | https |
| Fragment | Targets part of a document | #requirements |
| Activation | Requests navigation | Click, tap or keyboard Enter |
An address alone can sometimes be auto-detected and turned into a link by an application. That automatic behavior is a feature of the application, not proof that every sequence resembling a URL is safe. You should still examine the destination before trusting it.
Not every interactive control should be a link. A button commonly performs an action in the current interface, such as submitting a form or opening a dialog. A link typically navigates to a resource or destination. This distinction helps assistive technologies communicate what will happen and makes keyboard behavior more predictable.
An anchor without href can be used for other purposes, but it is not equivalent to an ordinary navigable hyperlink. MDN’s link creation tutorial demonstrates basic anchor syntax and common path structures.
For a beginner, the reliable mental model is simple: the link’s accessible content tells you what to expect, and its target identifies where the browser should go. The two should match closely enough to support an informed decision.
Read A Guide
URL Or Fragment
Navigate Or Jump
Compare Internal, External, Incoming And Anchor Links
Internal links connect destinations on the same website. They help readers navigate related explanations and move between supporting articles. For example, a page about a router may link to a separate guide about DHCP or IP addresses. A reader can continue learning without needing to search again. Internal navigation should be based on subject relevance rather than adding links only to reach a numerical target.
External links direct readers to a different website. They can provide primary references, software documentation and other information beyond the author’s own site. When recommending a technical procedure, a relevant manufacturer or standards-documentation link can be valuable. The writer should still check the destination and avoid presenting a third-party site as an endorsement of unrelated content.
Incoming links are references from other sites that point to your page. You cannot control every incoming link, and one external mention does not guarantee traffic or search rankings. Incoming links can help people discover a resource, but the usefulness and reliability of the destination still depend on the material itself.
A fragment link refers to a location within a page. The fragment often follows a hash symbol, such as #requirements. A table of contents might link to a heading that uses the same ID value. A fragment does not necessarily require the browser to load a different document. It can navigate within the current page if the target element is present.
Links can also point to downloadable files, email addresses and phone numbers using schemes supported by the browsing environment. An email link usually prepares a new message in a configured mail application; it does not silently send a message. Phone links behave differently depending on the device.
MDN identifies internal, external, incoming and anchor links as useful conceptual categories. Our DNS explainer is relevant because many links include a domain name that must be resolved to reach its web server.
The key point is that hyperlinks connect resources or locations, while the destination and context determine what actually happens when someone follows them. A link to a local section is not the same operation as leaving the current website.
Read The Structure Of A URL Correctly
A URL, or Uniform Resource Locator, is a type of resource identifier used to locate material. A typical web URL contains a scheme, hostname, optional port, path and sometimes a query or fragment. Understanding those pieces can help you troubleshoot broken links and spot misleading destinations.
Consider an illustrative address: https://www.example.com/guides/setup?mode=basic#requirements. The HTTPS scheme indicates the type of web connection. The hostname is www.example.com. The path identifies the resource location, and the query provides additional parameters to the application. The fragment requests a particular part of the resulting document, if available.
The host portion deserves particular attention in security reviews. In an address such as https://login.example.com.attacker.test/, the controlling domain is not example.com. The longer hostname belongs under attacker.test. Attackers sometimes exploit the way people read left-to-right labels to make an unfamiliar host look like a familiar brand.
An HTTPS address means the connection can be authenticated and encrypted when the certificate and browser checks succeed. It does not prove that the website operator is honest or that an individual page is harmless. Fraudulent sites can also use HTTPS.
Query parameters can affect what a page displays and may include tracking identifiers. Avoid casually sharing URLs that contain private authentication tokens, account-specific references or sensitive information in the query string. The path itself can also contain information that the recipient should not receive.
The fragment portion often identifies a location within the document and is generally handled by the browser. The page may use scripts that interpret it for application navigation. The familiar hash symbol does not mean every fragment has to correspond to a static heading.
For broader background, our IP address explanation distinguishes a web name or URL from an address used by the network layer to send packets. A URL, domain name and IP address are related but not interchangeable concepts.
Create A Basic HTML Link With The Anchor Element
The HTML anchor element is the ordinary mechanism for creating a link in a webpage. Its href attribute identifies a destination, and its contents describe the link. A basic example is intentionally small enough to examine without requiring a web development framework:
<a href="https://example.com/docs">Read The Documentation</a>
The browser generally presents the text as a navigable link and can include it in keyboard focus order. The exact appearance depends on browser defaults and styles. This example uses a documentation-only example domain and does not claim that a specific resource exists at that path.
You can use an absolute URL containing the full address, or a relative reference resolved against the current document’s base URL. For example, href="/guides/" generally refers to the guides path at the same site’s origin, while href="next.html" is resolved relative to the current base path. Leading slashes, directory placement and any configured base element matter.
To link to a heading in the same document, give the heading an ID and point the link’s href to the matching fragment. The IDs must match exactly. This simple method powers many accessible tables of contents:
<a href="#requirements">Jump To Requirements</a>
<h2 id="requirements">Requirements</h2>
Always choose useful link text. “Read The Documentation” is clearer than “Click Here” when the reader is deciding among several links. The text should accurately describe the destination and ideally remain understandable when taken out of surrounding context.
MDN’s creating links tutorial explains relative paths, href values and related practices. Readers learning HTML should focus first on valid semantic elements rather than using JavaScript to imitate a native anchor unnecessarily.
Do not put untrusted user input directly into an href without appropriate validation. A safe content management system or templating workflow should handle links according to its security model.
Make Links Accessible For Keyboard And Screen Reader Users
Accessible links are important because readers do not all use a mouse and visual display in the same way. A screen reader may present a list of links without the paragraphs surrounding them. If every link says “More” or “Click Here,” the reader cannot easily decide which destination is relevant.
Prefer descriptive phrases such as “Windows Wi-Fi Troubleshooting Steps” or “Official Keyboard Shortcuts.” A link does not need to include an entire sentence, but its purpose should be reasonably clear. W3C’s link purpose guidance describes why meaningful context and labels matter for people navigating by assistive technology.
Native anchors with href support familiar keyboard interaction. A reader can generally press Tab to move focus and Enter to activate the link. A custom clickable div may not provide equivalent semantics, focus behavior or keyboard access without additional implementation. Using the correct HTML element is often easier and more reliable.
Visible focus styling helps keyboard users find the selected link. Avoid removing outlines without providing another clear indication. Do not rely on color alone to distinguish an important link from ordinary text. Underlining or another persistent visual treatment can improve recognition, especially when a page contains many links.
If a linked image has no adjacent text, provide an appropriate accessible name. The alternative text should describe the function or destination, not merely the fact that the image is clickable. Decorative images inside a clearly labeled link may not need repeated descriptions.
W3C’s link-only success criterion at Level AAA is especially strict about understanding the destination from the link text itself. Following that principle can improve usability even when a site does not claim a particular formal conformance level.
Test the page without a mouse. Can you reach each link, identify focus, understand where it goes and activate it? That simple manual check is more informative than assuming that visible links are automatically accessible.
Understand Links In Word, PDF, Email And Messaging
Hyperlinks are not confined to webpages. Word processors can attach destinations to text or images. PDF readers can support link annotations and internal navigation. Email applications commonly render web addresses as clickable, while messaging apps may show previews. The destination concept is similar even though each application’s editing and security controls differ.
In a document editor, a writer can usually select text and use an Insert Link command or a keyboard shortcut to attach a URL. Some applications automatically detect typed addresses. After inserting a link, check that its visible text accurately describes the destination. A document that will be converted to PDF should be tested after export to ensure the links still function.
A PDF link can point to another document, a website or a location within the PDF. The actual behavior depends on the reader and file permissions. A printed paper copy obviously cannot offer interactive navigation unless it also contains a human-readable address or QR code that readers can use separately.
Email links need particular caution. The displayed sentence may claim that a bank or delivery company requires immediate action while the underlying URL leads elsewhere. Hovering or long-pressing to preview a destination can help, but mobile interfaces vary, and a convincing hostname can still belong to an attacker. When in doubt, open the organization’s official app or known site directly.
Be skeptical of files that ask you to enable unexpected macros or install software before viewing a supposedly linked document. A hyperlink is not inherently malicious, but it can deliver a reader to a harmful page or download. The attack usually depends on deception and what the user does after navigation.
Our phishing guide explains how misleading link presentation is used in fraudulent messages. The website safety checklist provides additional checks before entering credentials.
Treat link text as a promise, not as verification. Confirm important destinations independently when money, account access or sensitive information is involved.
Follow A Hyperlink Safely And Recognize Suspicious Destinations
Before opening an unfamiliar link, inspect the address if your device makes that possible. On desktop, hovering may reveal a destination in the browser’s status area. On mobile, a long press may offer a preview or context menu, though the exact result varies. Do not assume every app displays a preview in the same way.
Look for the true hostname and watch for misspellings, added words, unusual subdomains and lookalike characters. A message might display the name of a trusted company while sending you to an unrelated host. The full context of the message matters as much as the visible name.
If an unsolicited message demands urgent payment or account recovery, navigate to the organization’s known website or app manually rather than trusting the provided link. Contact the organization using a previously trusted channel when a request is unexpected. A password prompt after following a link deserves special attention if you have not verified the site.
HTTPS protects the transport connection under normal validation conditions, but it does not establish that a page is trustworthy. Attackers can obtain certificates for their own domains. Browser warnings about certificates, dangerous downloads or deceptive pages should be taken seriously rather than dismissed merely to reach a page.
Shortened links can be convenient, but they conceal the final destination from casual inspection. If an unknown sender insists on a shortened URL for a sensitive action, ask for a verifiable official route or find the destination through a trusted source. A link preview is not a guarantee of safety.
If you accidentally visit a suspicious page, visiting alone does not necessarily mean your accounts were compromised. The response depends on whether you downloaded a file, entered credentials or granted permissions. Close the page, avoid further interaction, and follow appropriate security steps if you shared sensitive information.
The purpose of good link hygiene is informed navigation, not fear of every hyperlink. Most legitimate sites use links constantly. The priority is to recognize when a destination and its claimed identity do not agree.
Fix Broken Links, Redirects And Missing Page Anchors
A broken link may produce an error page, point to a removed resource, or navigate to the wrong section. The problem can be as simple as a typo in the path or as complicated as a website migration that changed URL structure. A page returning HTTP 404 generally means the requested resource was not found at that address, not that every page on the site is unavailable.
For a broken internal link, first inspect the saved destination. Check the hostname, path, capitalization where the server treats it as significant, and trailing slash conventions. If the page moved, update the reference or configure an appropriate redirect under the site’s management process. Do not create long chains of redirects unnecessarily.
For an anchor that fails to jump to a heading, compare the href fragment against the target ID. For example, a link to #setup does not find a heading whose ID is requirements. Dynamic content, duplicate IDs or scripts that change page layout can also complicate anchor navigation.
External links need periodic review because another website can remove or reorganize material without informing you. A different page at the same URL may no longer support the claim you cited. Read the destination again before assuming that any HTTP response other than 404 guarantees relevance.
Search engine visibility is a separate issue from basic navigation. A working link can help a crawler discover content, but its presence does not guarantee indexing or rankings. Quality, relevance, accessibility and site architecture all matter. Treat claims that a fixed number of links will automatically improve search rank with skepticism.
For practical troubleshooting, distinguish link failure from connectivity failure. If no website opens, our Wi-Fi internet troubleshooting guide may be more relevant. If one known link fails while other pages work, focus on the destination and site configuration.
Record both the link as presented and the actual resulting address when reporting a problem. That evidence helps a site editor correct the right item without guessing.
Build Useful Internal Linking And Navigation On A Website
Internal linking is most valuable when it helps a reader answer the next natural question. A motherboard article can link to RAM and storage explanations. A guide to the internet can link to routers, DNS and IP addresses. Those relationships form a usable knowledge base when the linked pages are genuinely relevant.
A navigation menu, breadcrumb trail, table of contents and contextual article link serve different roles. Navigation menus help readers understand the site’s major sections. Breadcrumbs communicate hierarchy. A table of contents moves within a longer document. Contextual links lead to more detailed information on related subjects. None should be added merely to make the page look crowded.
Avoid using identical, vague text for several unrelated destinations. A link labeled “Troubleshoot Windows Search” is more informative than “Learn More.” Use phrases that fit naturally into a paragraph, and do not stuff a keyword into every link. Relevance and clarity are more important than repeating an exact search phrase.
When opening outside references in a new browser tab, consider the user’s experience and the relevant security attributes. Modern HTML supports rel="noopener" to prevent a newly opened browsing context from accessing the original page through window.opener. MDN documents its behavior. Not every external link needs to open a new tab, and unexpected new tabs can confuse users.
Maintain a simple audit routine: check for dead destinations, stale product URLs, misleading descriptions, links to sensitive operations, and anchors that no longer match headings. A content migration should include link verification rather than assuming the old paths remain valid.
Our technology glossary is an example of how a structured site can help readers move among related concepts. The point is not the number of links; it is their contribution to finding understandable, trustworthy information.
For site owners, preserve stable slugs where practical. When a change is required, use a deliberate redirect and check that the new target meets the original reader expectation.
Practical Examples And A Link Quality Checklist
Imagine a support article explaining how to resolve a printer error. It includes an internal link to a printer setup guide, an external link to the manufacturer’s approved driver page and a fragment link to its own troubleshooting section. Each link serves a distinct purpose: context, authoritative download instructions and convenient navigation.
Now imagine a newsletter that displays “Verify Your Account” but links to a newly registered unrelated domain. The visible text gives no reliable evidence that the target is the organization it impersonates. The recipient should reach the legitimate account service independently instead of relying on the message.
A well-written link checklist asks several concrete questions. Is the destination genuine and relevant? Does the accessible name explain it? Does it work with a keyboard? Does a new-tab behavior have a reason? Does the destination expose sensitive information or send users toward a risky download? Are internal section IDs correct and unique?
If the page is public, review it on a narrow mobile screen and in a browser with keyboard navigation. Ensure that links are not so close together that tapping the intended one becomes difficult. Confirm the focus indicator is visible and that the text remains legible against its background.
For a site containing many posts, sampling only the homepage is not sufficient. Check navigation menus, older articles and deep pages that may contain links to relocated resources. Broken internal references often accumulate after redesigns and slug changes.
Be careful when inserting affiliate or sponsored links. Disclose commercial relationships where applicable and follow the platform’s relevant policies. A reader should understand when a recommendation has a financial connection. Avoid presenting a sponsored destination as an independent technical source.
The best hyperlink succeeds at two jobs simultaneously: it helps the reader make sense of where to go, and it correctly points to the intended resource. Those outcomes are more valuable than decorative link styling or an artificially large number of references.
Frequently Asked Questions
What Is A Hyperlink In Simple Words?
A hyperlink is a clickable or keyboard-activatable reference that connects to another resource or a location within a document.
What Is The Difference Between A URL And A Hyperlink?
A URL identifies a resource location; a hyperlink is an interactive reference that can use a URL as its destination.
Are Hyperlinks Always Blue And Underlined?
No. Website styles and user preferences vary. A proper link can also be an image or navigation control.
What Is An Internal Link?
It connects resources within the same website, helping readers move between related pages.
What Is An Anchor Link?
It targets a location within a document, commonly by matching a URL fragment to an element ID.
Are HTTPS Links Always Safe?
No. HTTPS protects aspects of transport, but a fraudulent website can also use HTTPS.
Can A Hyperlink Open An Email Application?
Yes. A mailto link can prepare a new email in a configured application, but does not normally send a message automatically.
Why Is Descriptive Link Text Important?
It helps readers, including screen reader users, understand the link purpose and select the right destination.



