HTML File Paths In Hindi – What is a File Path In HTML?

HTML

HTML File Path In Hindi – What is a File Path in Hindi? – File Path Ek Tareeka Ka File Address Hota Hai, Jisse Hum Samajh Sakte Hain Ki Koi Particular File Kaha Par Locate Karti Hai.

What Is A File Path In HTML? HTML Mein Kisi Bhi Webpage Ko Design Karte Time Jab Kuch External Resources Ko Embed Karna Hota Hai Toh Hume Unn Resources Ka Link Ya File Address Dena Hota Hai. Jisse Web Browser Ko Pta Chalta Hai Ki Woh Uss Web Folder Mein Kaha Par Aur Kis Naam Se Lacated Hain. Jin Resources Ke Liye File Path Deni Ki Zaroorat Hoti Hai Who Neeche Diye Gaye Hain:

HTML File Paths In Hindi

  • Images
  • Videos
  • Style Sheets
  • JavaScript Files
  • Other WebPages, etc..

Note: Kisi Bhi File Ka Path Dene Ke Liye Uska Source Puri Tareeke Se Pta Hona Zaroori Hai.

Aage Iss Chapter Mein Hum Kuch Example Ki Sahayta Se Samjhenge Ki Kaise File Paths Ko Use Kiya Jata Hai. Examples Ke Liye Hum “Image” Ka Istemal Krenge.

Syntax To Give A File Path

Kisi Webpage Mein Image Ko Insert Krne Ke Liye File Path Is Tareeke Se Diya Jaega:

<img src=” ”> – src attribute mein file ka path diya jaega

For example,

<img src="https://i0.wp.com/masterprograming.com/wp-content/uploads/2020/12/cropped-MasterPrograming-6.png?w=360">

In How Many Ways A File Path Is Given In HTML?

HTML Webpage Design Karte Time Kisi Bhi External File Ko Insert Karne Ke Liye Web Folder Me Located Files Ka Path 2 Tareeke Se Diya Ja Sakta Hai:

  • Absolute File Paths
  • Relative File Paths

Absolute File Path

Iss Tarah Ke File Path Me File Ka Complete Address (URL) Diya Jata Hai.

Example:

<!DOCTYPE html>
<html>
<body>

<h2>Using a Full URL File Path</h2>
<img src=" https://i0.wp.com/masterprograming.com/wp-content/uploads/2020/12/cropped-MasterPrograming-6.png?w=360&ssl=1" alt="Master Programming LoGO" style="width:300px">

</body>
</html>

Output:

Relative File Path

Iss Tarah Ke File Path Ko 3 Tareeke Se Diya Ja Sakta Hai:

  1. Jab File Same Folder Me Hoti Hai Jisme Current Webpage File Hoti Hai
  2. Jab File Current Webpage Folder Se Ek Level Upar Wale Folder Me Hoti Hai
  3. Jab File Current Website Ke Root Folder Mein Hoti Hai

Neeche Teeno Ka Ek-Ek Example Diya Gya Hai, Code Ko Copy Karke Practice Karen:

Example 1: (same folder)

<!DOCTYPE html> 
<html> 
    <head> 
        <title>Relative file path</title> 
    </head> 
    <body> 
        <h2>File present in the same folder</h2> 
        <img src="image.jpg" alt="My Image" style="width:400px"> 
    </body> 
</html> 

Example 2: (one folder level-up from the current webpage folder)

<!DOCTYPE html> 
<html> 
    <head> 
        <title>Relative file path</title> 
    </head> 
    <body> 
        <h2>File present in a folder above the current folder</h2> 
        <img src="../images/image.jpg" alt="My Image" style="width:400px"> 
    </body> 
</html> 

Example 3: (root folder of the current web)

<!DOCTYPE html> 
<html> 
    <head> 
        <title>Relative file path</title> 
    </head> 
    <body> 
        <h2>File present in a folder which is located at<br> 
        the root of the current subdirectories</h2> 
        <img src="/images/image.jpg" alt="My Image" style="width:400px"> 
    </body> 
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *