/
21 File Paths.html
20 lines (15 loc) · 1.04 KB
/
21 File Paths.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<!--HTML File Paths
location of a file in a site's folder structure; used to link external files like web pages, images, style sheets, JavaScripts
<img src="pic.jpg"> pic.jpg in same folder as current pg
<img src="images/pic.jpg"> pic.jpg in images folder in current folder
<img src="/images/pic.jpg"> pic.jpg in images folder at root of current web
<img src="../pic.jpg"> pic.jpg one level up from current folder -->
<!--Absolute File Path; full URL to internet file-->
<img src="https://www.w3schools.com/images/picture.jpg" alt="Mountain">
<!--Relative File Paths; points to file relative to current page (best practice; links work on your own computer (localhost) as well as your current public doman and future public domains)-->
<img src="/images/picture.jpg" alt="Mountain">
<!--points to file in images folder-->
<img src="images/pictures.jpg" alt="Mountain">
<!--points to file in images folder in current folder-->
<img src="../images/picture.jpg" alt="Mountain">
<!--points to file in images folder located one level above current folder-->