What is a hyperlink element?
A hyperlink is an element that is used to navigate users to another web page, html document or another website. This element can be a text, button and sometimes an image that you can click to navigate to another html document.
Which element do we use to create a hyperlink?
To create a hyperlink element we use this element < a></a> also known as an anchor element, to direct visitors or users to another webpage. We then use this important attribute href = "another-page.html" to specify which webpage we want users to be directed to. The text between the quotation marks is the link or html document name we provide to direct users to that document when they click on the hyperlink.
This is how developers connect different webpages, documents or websites together so that people can easily navigate to other pages and make the web pages connected to each other.
How to create a hyperlink element for your webpage?
Let's create a hyperlink to direct users or our website visitors to youtube.
Example hyperlink element code
<a
href = "https://youtube.com">
My youtube channel
</a>
When you click on that hyperlink the browser checks the url you provided using the href attribute and loads the link between the quotation marks and you will be directed to youtube. This link will appear in a different color on your browser often with a blue or purple color and underlined with blue or purple, so that people can see that this is a clikable element.
Another example hyperlink element code
We can change the specified url between the quotation marks to "https://hiiscript.com" to direct people to this website.
<a
href = "https://hiiscript.com">
Hiiscipt.com
</a>
Why is a hyperlink element important?
It is important because it makes the internet connected, interactive and used to navigate users to other webpages.It helps visitors on your website move around from one page to another saving time without needing to type urls or searching to discover more information on any website. Without hyperlinks it will be hard to navigate on a website and it will be time consuming for users to find more information because they will have to search again or type urls manually.
Html quiz
What is the correct syntax for a hyperlink element?