File path in HTML
The article explains how to refer to the file path in HTML.
File path in HTML
The file path is the file's address in the directory structure of the website, which can be used when linking to external files such as:
- Webpage
- Image
- Style Sheet
- JavaScript




Absolute file path
Absolute path is the full URL of the Internet file.

Relative file path
The relative path points to a file related to the current page. In this example, the path points to the file in the last image folder of the current web page.

In this example, the path points to the file in the image folder placed in a folder on a level compared to the current directory.

Usually, use relative links (if possible) because the site will not be tied to a certain URL. All links are available on your computer (localhost) and on the public domain as well as in the future.
Previous article: JavaScript in HTML
The following article: Head element in HTML
You should read it
May be interested
- How to display the full path in File Explorer on Windows 10in this tutorial, tipsmake.com will guide you through the steps to display the actual full path for the current location in the file explorer title bar on windows 10.
- Basic examples of HTMLin the previous html lesson, you know which tools to use to write html code, how to save and open html files. this article will give some basic examples of html text.
- How to Make a Scrolling Marquee in HTMLa scrolling marquee is moving text added to a website, but html is no longer commonly used for this feature and is not recommended. the html tag for scrolling marquees has been deleted from the standard html library. to accomplish a...
- How do I show file paths on Mac?on macos, there are up to three methods that you can use to display specific file or folder paths.
- eQuiz - Multiple choice test on HTML knowledgein this test, we will proceed with the small html test, there will be 30 questions in total with no response time, you must choose the answer in each question. can continue to the next sentence.
- Paths in HTMLyou can find links (links) throughout the web. link allows clicking to switch to another page.
- How to Convert Html to Wordthis wikihow teaches you how to convert an html file into a word document. you will need to use microsoft word to perform this process; luckily, word will automatically convert an html document into its web page format when you open the...
- How to save the entire website into an HTML filewe can save the entire web page as an html file to access it anytime using the singlefile utility installed on the browser.
- Why write neat and organized HTML?you will get many benefits from writing clean and precise html code. here's why it's a good idea to write optimal html code.
- HTML formthe form in html contains form elements - the element types that take input data such as filling in text fields, checkboxes, buttons, submit buttons ...