HTML
- Introduction To HTML
- HTML Editors
- HTML Basic Examples
- HTML Elements
- HTML Attributes
- HTML Headings
- HTML Paragraphs
- HTML Styles
- HTML Formatting Elements
- HTML Quotation
- HTML Comments
- HTML Colors
- HTML Styles - CSS
- HTML Links
- HTML Images
- HTML Tables
- HTML Lists
- HTML Block And Inline
- HTML Class
- HTML Id
- HTML Iframes
- HTML JavaScript
- HTML File Paths
- HTML Head
- HTML Layout
- HTML Responsive
- HTML Computer Code
- HTML Semantic
- HTML Forms
- HTML Form Attributes
- HTML Form Elements
- HTML Input Types
- HTML Input Attributes
- HTML Input Form Attributes
- HTML Canvas
- HTML SVG
- HTML Media
- HTML Video
- HTML Audio
- HTML YouTube
HTML File Paths
HTML File Paths
A file path specifies the location of a file within the folder structure of a website.
File Path Examples
Path | Description |
---|---|
<img src="picture.jpg"> | The "picture.jpg" file is located in the same folder as the current page |
<img src="images/picture.jpg"> | The "picture.jpg" file is located in the images folder in the current folder |
<img src="/images/picture.jpg"> | The "picture.jpg" file is located in the images folder at the root of the current web |
<img src="../picture.jpg"> | The "picture.jpg" file is located in the folder one level up from the current folder |
HTML File Paths
A file path specifies the location of a file within the folder structure of a website.
When creating hyperlinks to external files, such as:
- Web pages
- Images
- Style sheets
- JavaScripts
Absolute File Paths
A file's absolute path is its complete URL:
<!DOCTYPE html>
<html>
<body>
<h2>Using a Full URL File Path</h2>
<img src="https://www.mytat.co/images/picture.jpg" alt="Mountain" style="width:300px">
</body>
</html>
<html>
<body>
<h2>Using a Full URL File Path</h2>
<img src="https://www.mytat.co/images/picture.jpg" alt="Mountain" style="width:300px">
</body>
</html>
Relative File Paths
A relative file path specifies the location of a file in relation to the current page.
In the following example, the file path specifies a file located in the images folder at the root of the current web:
<!DOCTYPE html>
<html>
<body>
<h2>Using a Relative File Path</h2>
<img src="/images/picture.jpg" alt="Mountain" style="width:300px">
</body>
</html>
<html>
<body>
<h2>Using a Relative File Path</h2>
<img src="/images/picture.jpg" alt="Mountain" style="width:300px">
</body>
</html>
Products
Partner
Copyright © RVR Innovations LLP 2024 | All rights reserved - Mytat.co is the venture of RVR Innovations LLP