The HTML link is the tool by which all the navigation on the Internet is performed.
By the link, you can go from one resource to another, from one page to another, and also to navigate a separate page from one element to another.
To create a link, use the <a> tag. It is paired, built-in, so it can be placed in any part of the text, in a picture or label.
In HTML, there are three kinds of links.
1. Hyperlink – The main Internet link. It moves from one web page to another. In HTML it goes like this
<a href="https://starper55plys.ru" >Old pepper's blog</a>
a) href – mandatory attribute;
b) https://starper55plys.ru – URL of the linked page;
c) Old pepper’s blog – linked page name;
The hyperlink accepts the following attributes:
target=”_blank” – linked page will open in a new browser tab;
title=”Old pepper’s blog” – when you hover your mouse over the link, a window will appear with the text that you will write in this attribute. Usually this is the name of the linked page.
<a href="https://starper55plys.ru" target="_blank" title="Old pepper's blog>Old pepper's blog</a>
2. Anchor Link
Anchor references are used when you need to translate a visitor to a specific part of the page.
For this, the page element to which you want to go is marked with an ID, and the anchor is entered into the link
Point of departure
<p id="nev">Page Element</p>
You can anchor the anchor to a hyperlink
<a href=”https://starper55plys.ru/#nev”>Old pepper's blog</a>
The ID is set to the element of the page located at https://starper55plys.ru
3. Link to images
The image code is enclosed in the reference code
<img src="images/picture.png" align="right"
title="Название" alt="Описание" width="300"
height="100" hspace="20" vspace="20"></a>
<a> – link;
href — mandatory attribute indicating the address of the link;
<img> — picture;
src – mandatory attribute indicates the address of the image;
title="name" — image name;
alt="Description" — image description;
width="400" — image width;
height="400" — image height;
align="left" — picture position on page, takes align="left", align="right", align="center";
hspace="50" — indent from text horizontally;
vspace="50" — indent from text vertically;