The difference between src and href

Source: Internet
Author: User

SRC is the abbreviation for source, which points to the location of the external resource, and the content that is pointed to is embedded in the document where the current label is located. The resource it points to is downloaded and applied to the document when the SRC resource is requested. Elements such as JS scripts, IMG images, and frame.

<script src= ". js" ></script> when the browser resolves to the element, it pauses the download and processing of other resources until the element is loaded, compiled, and executed. So the JS script should be placed at the bottom rather than the head.

HREF is the abbreviation of hypertext reference. Point to the location where the network resource resides. Used to establish a connection between the current document and the referencing resource.

<link href= ". css" rel= "stylesheet"/> The browser recognizes that the file is a CSS file, it downloads the resource in parallel and does not stop processing the current document.

The difference between src and href

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.