HTML jumps to other pages

Source: Internet
Author: User

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 &LT;/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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.