Possible Duplicate:
Difference between SRC and HREF
When writing html/css, it seems like these all do the exact same thing. Obviously this is not the case, and if you 'href' when your supposed to 'src' your gonna have a bad time. But my question is, is there an easy way to remember which ones do which, and when they are used?
src -- I want to load up this resource for myself.
href -- I want to refer to this resource for someone else.
url -- A script wants to use this url as a variable.
it's very simple
you can use
href
for links as follows:<a href="http://www.google.com/">Click here</a>
<link href="mystylesheet.css" type="text/css">
Now use to
src
put the links into html like this:<img src="mypic.jpg">
<script src="script.js"></script>
url
.href
(short for Hypertext REFerence) for all kinds of links, including tagsa
andlink
.src
.