- Web design
- HTML5
- here
[HTML5] a tag-Create hyperlink
Use the a tag to create a hyperlink. This is a sample that specifies the URL for getting started with HTML / CSS.
<a href="https://en.webdesign.perlzemi.com/"> Introduction to HTML / CSS</a>
The linked text is called linked text.
Specify the page with an absolute path
You can link to pages within the same site by using an absolute path that starts with "/".
<a href="/blog/20200204092826.html"> html tag</a>
Specify the page with a relative path
If you use a relative path that does not start with "/", you can link to pages in the same site with a relative path.
<a href="20200204092826.html"> html tag</a>
You can link with a relative path, but it's always a good idea to link with an absolute path.
Opens a new window when you click the link
Specify "target =" _ blank "" to open a new window when you click the link.
<a href="https://en.webdesign.perlzemi.com/" target="_blank"> Introduction to HTML / CSS</a>
Hyperlink that passes the power of the page to the linked page
Hyperlinks with a tags are extremely important for SEO measures.
For example, let's say you want to link to "How to eat delicious yakiniku".
How to eat yakiniku deliciously
Then, the linked page becomes stronger with the keywords "Yakiniku", "Delicious", and "How to eat".
It is an image that passes the power of "Yakiniku", "Delicious" and "How to eat" that the current page has to the linked page.
If you don't want to pass the power of the page to the linked page
Use "rel =" nofollow "" if you don't want to pass the power of the page to the linked page.
If you want to strengthen the power of "Yakiniku" on the current page, you do not want to pass the power of "Yakiniku" to the link destination.
In such cases, you can use "rel =" nofollow "" to prevent the power of "Yakiniku" from the current page from being passed on to the linked page.
<a rel="nofollow" href="/"> How to eat delicious yakiniku</a>