- How to put your image file in the same directory as the html file?
- How do I show an image from a folder in HTML?
How to put your image file in the same directory as the html file?
To link to a target file in the same directory as the invoking HTML file, just use the filename, e.g. my-image. jpg . To reference a file in a subdirectory, write the directory name in front of the path, plus a forward slash, e.g. subdirectory/my-image. jpg .
How do I show an image from a folder in HTML?
In HTML, the <img> tag is used to add an image from the folder to the HTML document. The image path is specified by the src attribute of <img> tag. To specify the path, firstly write the folder name, then a backslash “/” and lastly, write the image name with its extension.