1. We often use the Internet to click on the content of the page, will jump to other pages, or another page of this site, then the problem, how to achieve it.
2. In fact, in HTML to achieve this effect is not difficult, the first thing we want to learn is the path of the jump page, generally divided into two kinds:
Absolute path;
relative path;
3. So what is the absolute path? When should we use absolute paths. First, the absolute path for external resources, as the name implies, is outside the LAN, such as we want to link to other sites, then this will have to use absolute path;
Writing format:
If we link to Baidu
<a href= "www.baidu.com" target= "_blank" > Baidu website </A&G t; We just need to write the website we want to link to in the back of Herf, then when we click on the Baidu website will achieve the effect we want. 4. So what is the relative path? In fact, it is also very well understood, is in the same LAN, or the same project inside. Then we'll have to use the relative path; writing format: If I have a project: & nbsp css: # deng.css #hao .css &N Bsp html: #deng. html&n Bsp #hao .html & nbsp At this time I am in deng.html a page, I want to jump to #hao.html; <a href= "./hao.html" target= "_blank" > Team list </a> & nbsp ./representing the file at the same level, it must be remembered that the relative path must be used at the same level to be found. If it is not in a file, then you need to use: /previous level to jump. How many levels you can use. /。 Write his address at the beginning of the position at the same level.
HTML jumps to another page