Professional Documents
Culture Documents
Hyper Links
Hyper Links
developer.mozilla.org
In this article, we'll go over what hyperlinks are and why they
matter.
Summary
As you can see in the three pillars, everything on the Web revolves
around documents and how to access them. The Web's original
purpose was to provide an easy way to reach, read, and navigate
through text documents. Since then, the Web has evolved to
provide access to images, videos, and binary data, but these
improvements have hardly changed the three pillars.
1 of 5 4/4/22, 3:41 AM
What are hyperlinks? - Learn web development | MDN about:reader?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%...
Before the Web, it was quite hard to access documents and move
from one to another. Being human-readable, URLs already made
things easier, but it's hard to type a long URL whenever you want
to access a document. This is where hyperlinks revolutionized
everything. Links can correlate any text string with a URL, such
that the user can instantly reach the target document by activating
the link.
Links stand out from the surrounding text by being underlined and
in blue text. Tap or click a link to activate it, or if you use a
keyboard, press Tab until the link is in focus and hit Enter or
Spacebar.
Links are the breakthrough that made the Web so useful and
successful. In the rest of this article, we discuss the various types
2 of 5 4/4/22, 3:41 AM
What are hyperlinks? - Learn web development | MDN about:reader?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%...
Deeper dive
Types of links
Internal link
A link between two webpages, where both webpages belong
to the same website, is called an internal link. Without internal
links, there's no such thing as a website (unless, of course, it's
a one-page website).
External link
A link from your webpage to someone else's webpage.
Without external links, there is no Web, since the Web is a
network of webpages. Use external links to provide
information besides the content available through your
webpage.
Incoming links
A link from someone else's webpage to your site. It's the
opposite of an external link. Note that you don't have to link
back when someone links to your site.
3 of 5 4/4/22, 3:41 AM
What are hyperlinks? - Learn web development | MDN about:reader?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%...
that new page. On the other hand, if your site has more than about
ten pages, it's counter-productive to link to every page from every
other page.
When you're starting out, you don't have to worry about external
and incoming links as much, but they are very important if you
want search engines to find your site (see below for more details).
Anchors
Most links tie two webpages together. Anchors tie two sections of
one document together. When you follow a link pointing to an
anchor, your browser jumps to another part of the current
document instead of loading a new document. However, you make
and use anchors the same way as other links.
4 of 5 4/4/22, 3:41 AM
What are hyperlinks? - Learn web development | MDN about:reader?url=https%3A%2F%2Fdeveloper.mozilla.org%2Fen-US%...
Links matter both to users and search engines. Every time search
engines crawl a webpage, they index the website by following the
links available on the webpage. Search engines not only follow
links to discover the various pages of the website, but they also
use the link's visible text to determine which search queries are
appropriate for reaching the target webpage.
Links influence how readily a search engine will link to your site.
The trouble is, it's hard to measure search engines' activities.
Companies naturally want their sites to rank highly in search
results. We know the following about how search engines
determine a site's rank:
!"A link's visible text influences which search queries will find a given
URL.
!"The more incoming links a webpage can boast of, the higher it
ranks in search results.
Next steps
5 of 5 4/4/22, 3:41 AM