html img src local file path code example

Example 1: path in html

/   = Root directory
   .   = This location
   ..  = Up a directory
   ./  = Current directory
   ../ = Parent of current directory
   ../../ = Two directories backwards

Example 2: image urol in src local image

<!DOCTYPE html>
<html>
   <head>
      <title>
         HTML img tag
      <title>
   </head>

   <body>
      <img src="file:/D:/images/logo.png" alt="Site Logo" width="50" height="50">
   </body>
</html>

Example 3: html relative path

<!--The ./ means the contact.html file is in the same file 
as the file that is linked to it-->
<a href="./contact.html">Contact</a>