In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to write the relative path of html5. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Html5 relative path of writing: 1, the use of "file name" to represent the same level path file; 2, the use of ". / file name" to represent the superior directory file; 3, the use of ".. / file name" to represent the superior file; 4, the use of "peer directory name / file name" to represent the subordinate directory file.
The operating environment of this tutorial: windows10 system, HTML5 version, Dell G3 computer.
How to write the relative path of html5
Purpose: specify the path relationship with other files (or folders) caused by the path where this file is located
If the source file and the reference file are in the same directory, write the name of the reference file directly, and the way to reference the file is to use the relative path.
Let's set up two HTML documents, info.html and index.html, as examples, both of which are required to add an index.html hyperlink to info.html.
Eg1: a simple application of relative path
Suppose: the info.html path is: c:/Inetpub/wwwroot/sites/blabla/info.html
The index.html path is: c:/Inetpub/wwwroot/sites/blabla/index.html
Written as follows:
This is a hyperconnection.
Eg2: how to represent the parent directory
.. / represents the directory above the directory where the source file is located, http://www.cnblogs.com/ represents the directory above the directory where the source file is located, and so on.
Suppose: the info.html path is: c:/Inetpub/wwwroot/sites/blabla/info.html
The index.html path is: c:/Inetpub/wwwroot/sites/index.html
Written as follows:
This is a hyperconnection.
Eg3: how to represent the superior directory
Suppose: the info.html path is: c:/Inetpub/wwwroot/sites/blabla/info.html
The index.html path is: c:/Inetpub/wwwroot/sites/wowstory/index.html
Written as follows:
Index.html
Eg3: how to represent subordinate directories
Refer to the files of the subordinate directory and write the path of the subordinate directory file directly.
Suppose: the info.html path is: c:/Inetpub/wwwroot/sites/blabla/info.html
The index.html path is: c:/Inetpub/wwwroot/sites/blabla/html/index.html
Written as follows:
This is a hyperlink. Thank you for reading! This is the end of the article on "how to write the relative path of html5". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un