Hello friends, today we are going to talk about links in html! YES because they exist! and they are an incredible tool to keep the information more connected without the need to search for it on our own. Creating something like a spider web.🕸️🕷️
How does it work ?🤔
Very simple!! using the tag:
<a href="..." >Link Text</a>
This way we create a "hyperlink" similar to a word or google document.
We can classify them in :
- Internal links 👉 inside the website
- External links 👉 within another website of the same domain.
- Position links 👉 inside a section of the website.
Let's look at some examples 😎:
Position Links:
When we create internal links inside the page, the links are called ✨anchors✨ and allow us to move in the page:
<ul>
<li>
<a href="open">link 1</a>
</li>
<li>
<a href="close">link 2</a>
</li>
</ul>
<div id="open" class="section"></div>
<div id="closed" class="section"></div>
External Links
The navigation menus of websites, which are an essential component, are built with links too! :
<ul>
<li><a href="https://example.com">Website</a></li>
<li><a href="mailto: myemail@example.com">Email</a></li>
<li><a href="tel: +75 19864321495">Phone</a></li>
</ul>
That's not all! Links can be camouflaged between the different elements of the website! From an image to the logo almost everything can be a link but it is important to always keep the necessary ones because links are related to the SEO of a website.
Alright guys! I think we'll call it a day, I hope you like today's post! Remember guys always be the best version of you! 😎
Top comments (0)