Curriculum
Course: HTML Basic
Login

Curriculum

HTML Basic

HTML Introduction

0/1

HTML Editors

0/1

HTML Elements

0/1

HTML Attributes

0/1

HTML Headings

0/1

HTML Paragraphs

0/1

HTML Styles

0/1

HTML Formatting

0/1

HTML Quotation

0/1

HTML Comments

0/1

HTML Colors

0/1

HTML Favicon

0/1

HTML Page Title

0/1

HTML Block and Inline

0/1

HTML Iframes

0/1

HTML Java Script

0/1

HTML File Paths

0/1

HTML - The Head Element

0/1

HTML Style Guide

0/1

HTML Entities

0/1

HTML Symbols

0/1
Text lesson

HTML File Paths

A file path delineates the position of a file within a website’s directory structure.

File Path Examples

Path

Description

<img src=”picture.jpg”>

The file “picture.jpg” resides in the identical folder as the current page.

<img src=”images/picture.jpg”>

The “picture.jpg” file is situated within the “images” folder within the current directory.

<img src=”/images/picture.jpg”>

The “picture.jpg” file is situated in the “images” folder at the root of the current website.

<img src=”../picture.jpg”>

The “picture.jpg” file is situated in the folder one level above the current directory.

HTML File Paths

A file path delineates the location of a file within a website’s folder structure.

File paths are utilized when linking to external files such as:

  • Web pages
  • Images
  • Style sheets
  • JavaScripts

Absolute File Paths

An absolute file path represents the complete URL to a file.

Example

<img src=”https://www.w3schools.com/images/picture.jpg” alt=”Mountain”>

Relative File Paths

A relative file path directs to a file relative to the current page.

In the given example, the file path directs to a file within the “images” folder situated at the root of the current website.

Example

<img src=”/images/picture.jpg” alt=”Mountain”>

In this example, the file path indicates a file within the “images” folder within the current directory.

Example

<img src=”images/picture.jpg” alt=”Mountain”>

In this example, the file path directs to a file within the “images” folder situated one level above the current directory.

Example

<img src=”../images/picture.jpg” alt=”Mountain”>

 

 

Click to Learn