[small knowledge Point] absolute path and relative path.

Source: Internet
Author: User

1, absolute path and relative path:
The 1.1 path is divided into two types

First Type: absolute path
(1) The full path of the file ,
For example: file:///C:/Users/asus/Desktop/1018/day01/code/image label. html

Second type: relative path (* * * * *)
(1) Location of a file relative to another file
The first case: Pictures and HTML files under a folder
(1) write the name of the picture directly in HTML

Second case: Picture in the lower directory of HTML
(1) write out the full path of the HTML and the full path of the picture
Html:c:\users\asus\desktop\1018\day01\code\ a.html
Image: C:\Users\asus\Desktop\1018\day01\code\ img\w01.png

= W01.png in the lower directory of code in the directory where a.html is located
=

Third case: Pictures in the upper-level directory of HTML
Html:c:\users\asus\desktop\1018\day01\ code\a.html
Image: C:\Users\asus\Desktop\1018\day01\ c.png
= c.png The upper directory of code in the directory where a.html is located
= How to represent the upper-level directory: /
=
= .. /.. /: Upper Layer

Later thought will add, knowledge points, although small, but still very easy to make mistakes, record here memo.

[small knowledge Point] absolute path and relative path.

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.