Internal links in HTML
In the previous lesson, we made links to pages of other sites by copying their address from the browser address bar. Now let's say you want to link pages of your site.
In this case, you can't copy their addresses from the address bar. The thing is that such addresses will contain the full path to your page from the root drive of your computer, and when moving to another folder, such links will simply break.
For the pages of your site, you should practice a different approach. Let's study it with an example. Let's say that in the root folder of your site there is a file index.html and a file page.html. Let's link these files. To do this, in the attribute href of the links, you should simply write the names of these files (with their extension). Let's do this.
On page index.html we will make a link to page page.html:
<h1>Index</h1>
<a href="page.html">link on page</a>
And on the page page.html we will make a link to the page index.html:
<h1>Page</h1>
<a href="index.html">link on index</a>
Make three HTML pages at the root of your site. Name them 1.html, 2.html, 3.html. Link these pages to each other.
Also make a page index.html. Place links to pages 1.html, 2.html, 3.html on it.
Modify the previous problem so that the links are in the list ul.