+ 3
<img src ="img.png"> in this code - is path of image is relative or absolute and why?
4 Antworten
+ 3
An absolute path consists of protocol (http, https, ftp etc.), followed by domain, and optionally physical path to the resource.
A relative path uses the current path as the base, and goes up/down the directory structure the by use of .. (double dot) symbol (where applicable).
A mere filename with no path specified may be considered a relative path cause it doesn't specify the protocol, domain etc. like an absolute path does.
Hope I get it right ...
+ 4
Sancho Godinho
Thank you for answering but it's not I am asking
My question is path(src) of image file is relative or absolute
+ 4
Ipang thank you for answering
+ 2
By Default,
The Object Remains In Relative Position.
Also, If You Want To Make The Position Absolute,
You Have To:
<style>
img{
position: absolute;
}
</style>
So, The Image Is Currently Relative...