+ 9
Whats the difference between href and src in HTML?
link - href img - src base - href srcipt - src source - src
9 Respostas
+ 12
I think by using href we may provide a link to other URL but src is more specified about the think like some library or any file etc.,on the web or the computer
+ 15
@Hamja : src can also be used to link to libraries and frameworks
+ 7
@Decodes srcipt src = https://www.jquery.com/3.1.1.js How? It is an online file and link href = w3.css in Computer
Please ignore the given link. Its just for illustration
+ 1
href is used to link another web site ,while src is used to look for a particular thing like image or file in a computer file
+ 1
src SHOWS something from anywhere (images from your desktop, videos from YouTube, etc.)
<img src="images/photo.jpg" alt="photo">
<iframe src="http://www.youtube.com/embed/kkytzD30nJ8">
href provides a link to other website or element
<... href="http://www.github.com">
<... href="css/styles.css">
+ 1
src is used for providing the source location from where the file or image can be linked in our HTML page
0
src...for image
href...for web site
0
href (hyper reference) is a URL link address of any website like href=" http://www.google.com" while src (source) is a location which locate file (images) like src=" Images/picture/cat image.jpg( or png) "
- 1
sorry ,src is used to link to a particular file in a computer folder