In actual web development, inserting pictures, including CSS files, etc. requires paths. If the file path is added incorrectly, the reference will be invalid (the link file cannot be browsed, or the inserted picture cannot be displayed, etc.). Many beginners are confused. Let me introduce the relative path and the absolute path in detail below.
HTML relative path Refers to the path relationship between other files (or folders) caused by the path where this file is located.For example:
The absolute path of file 1.htm is: d:/www/html/1.htm
The absolute path of file 2.htm is: d:/www/html/2.htm
Then: the path of 1.htm relative to 2.htm is: 1.htm
How to use relative links: If you link to the same directory, just enter the name of the document you want to link, for example: XML/HTML Code Copy content to clipboard