There is a difference between src and href, which can be confused and used.
SRC is used to replace the current element , and thehref is used to establish a connection between the current document and the referencing resource .
SRC is the abbreviation for source , which points to the location of the external resource, which is embedded in the document where the current label is located, and the resources it points to are downloaded and applied to the document when the SRC resource is requested, such as JS scripts, IMG images, and frame elements.
<script src = "js.js" ></script>
When the browser resolves to the element, it pauses the download and processing of other resources until the resource is loaded, compiled, executed, and so on, like pictures and frames, similar to embedding the resource in the current tag. This is why the JS script is placed at the bottom instead of the head.
The href is the abbreviation for the hypertext reference , which points to the location of the network resource, establishes the link between the current element (anchor point) or the current document (link), and if we add in the document
<link href= "Common.css" rel= "stylesheet"/>
The browser will then recognize the document as a CSS file, and it will download the resources in parallel and will not stop processing the current document. This is why it is recommended to use the link method to load the CSS instead of using the @import method.
[The difference between the]src and the href attribute