What are the URL, SCR, and href differences in HTML URLs?
URL: Uniform Resource Locators (Uniform Resource Locator), a Web browser requests a page from a Web server via a URL.
URLs are not attributes, src and href are attributes, SRC is used to replace the current element, href is used to establish a connection between the current document and the reference resource, i.e. the path referenced by SRC is the path to be loaded by IMG, and the path referenced by the href is where you want to jump.
What is SRC?
SRC is a shorthand for source, that is, to introduce the file, the purpose is to load the file into the HTML page, when the browser will pause the other content when parsing and will load the SRC content first, you must wait until the SRC content is loaded after the completion of the subsequent execution. This is why JS files are often placed at the bottom of the HTML file for the reason. If you put a JS file on the page head: Window.onload event processing. The browser recognizes the document as a CSS document, downloads the document in parallel, and does not stop processing the current document. This is also the reason to suggest using link instead of @import to load the CSS.
The content of SRC is an essential part of the page, and the content that is introduced to SRC is embedded in the document where the current label resides. Commonly used are: IMG, script, iframe. For example:
What is href?
The href is a shorthand for hypertext reference, which represents the link between a hypertext reference, the location of the network resource, the establishment and the current element (anchor point), or the current document (link), which is linked to the direct relationship to the page, The page itself does not stop loading other content when it is loaded. Used to establish a link between the current element and the document.
Commonly used are: link, a. For example:
<link href="reset.css" rel=”stylesheet“/>
The differences between URLs, SCR, and href in HTML