Home > Web Front-end > HTML Tutorial > Absolute path URL and relative path URL in html and subdirectories, parent directories, root directories_HTML/Xhtml_Web page production

Absolute path URL and relative path URL in html and subdirectories, parent directories, root directories_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:37:11
Original
2689 people have browsed it

Absolute URLs are used to represent all the content required for a specific file on the Internet. Every file on the Internet has a unique URL. This is the link that needs to be entered into the address bar when searching on the web.

For example, to enter a webpage on Baidu, enter: http://www.baidu.com./ in the address bar of the webpage.

Once you enter a certain web page, when you click on other screens inside it, you may notice that the link in the address bar may become very long. This is because the address of the clicked content will be used: relative URL. Relative URLs are only suitable for other directories under links to web pages with the same name, and will be invalid if they enter other websites. If you want to connect to a resource in the same directory, you only need to change the file name, but the original address does not need to be changed.

1. Subdirectories

The subdirectories in the computer are easy to understand. For example: C: is the parent directory, C:Windows is the subdirectory of C:; C:WindowsSystem32 is C:Windows subdirectory.

For each level of subdirectory, you only need to add a slash / after the parent directory and then add the file name to form a subdirectory.

2. Parent directory

Parent directory: C:WindowsSystem32 in the same 1, C:Windows is the parent directory of System32.

3. Root directory

Root directory: The example is the same as above, that is, C:/ is the root directory.

The same is true for directories in html. It’s just that the root directory needs to be changed to this pattern: architecture server address file name in this form.

Example:

http://www.wrox.com/index.html;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template