In these Blogs, we are trying
to build a sound foundation for learning and understanding things related to web technologies. Hyperlinks are one of the most important
constituents of a website. We already talked about hyperlinks or simply a link
in an earlier Blog. However, in this Blog, we will try to explore and
understand it in a little more detail. The term hyperlink is not new. This term
was first used by Ted Nelson as a mechanism to link related information. Later,
Sir Tim Berners-Lee used it in his development of the HTTP protocol. Since then,
hyperlinks are being used to link related content over the World Wide Web. At the
most basic level, a hyperlink is a pointer to a resource. These links may point
to a variety of things. Some commonly used resources are listed here. HTML
documents Specific parts of an HTML document
Images Blogs File downloads This list is not exhaustive. In fact, you
can create a link to anything that can live on the internet. I hope you already
understand that anything or everything that lives on the web has a URL. The URL
is used to identify and locate the resource. So, to create a hyperlink that
points to a resource, the first thing that you should know is the resource URL. Once you have the URL, the rest is simple. We will learn more about HTML in a separate Blog series. However, HTML offers a simple mechanism to
create a hyperlink. Here is an example of HTML code. If you save this code in a
test.html file and open the file in a browser, you will see something like
this. In this example, the text “Google” is a hyperlink. However, behind that text, we have an HTML
tag. This tag is known as the anchor tag that is responsible for creating
hyperlinks. If you look at the code
carefully, we have a href attribute. The attribute href stands for hypertext
reference. The value of the href attribute is a URL where we want to point the
link. Right? That’s what I said earlier. To create a hyperlink that points to a
resource, you need to know its URL. There are a variety of things you can do
with the anchor tag and customize your
hyperlinks and their behavior. We will talk about those things in our HTML
tutorials. However, the objective of this Blog was to give you a realistic sense
of the hyperlink. I guess I fulfilled the purpose. Keep learning and keep growing.
0 Comments