Why when using anchors we need to use href and not src like with the image and video tags?


href is a URI for a hypertext link to another document. The request is not embedded in the document when it comes down but replaces the one in the tab, or opens in a new tab, as directed.

src is a URI for an embedded object, such as an image, video or audio fie, script, SVG, applet, etc…


Href also means Hypertext Reference which is why they use it.

If we consider ID as a hook in the document, it can also mean,

Hook REFerence

1 Like