What is the path for an image located in same folder as the current page? [code]

What is the path for an image located in same folder as the current page?
Code:
A. <img src= “pic.jpg”>
B. <img src= “../pic.jpg”>
C. <img src= “images/pic.jpg”>
D. <img src= “/images/pic.jpg”>
 
Answer: a
Explanation: The path <img src= “pic.jpg”> indicates that pic.jpg is located in same folder as current page. The path <img src= “images/pic.jpg”> indicates that pic.jpg is located in current folder. The path <img src= “/images/pic.jpg”> is located in images folder at root of current web. The path <img src= “../pic.jpg”> indicates that pic.jpg is located in folder one level up from current folder.
 

Tìm kiếm

Back
Top