A small summary of src and href

Source: Internet
Author: User

src (source) Sources

replaceable element, where src points to is embedded in the document where the current label is located

If used:

href (hypertext Reference) hypertext reference

Used to establish a relationship between the document involved and the external resource, so that the current label can be linked to the destination address, rather than to pull the target into the page to replace the original content

If used: <a href= "#" ></a>

* But when we load JS and CSS files

<script src= "Bootstrap/js/bootstrap.min.js"></script>
<link href= "bootstrap/css/bootstrap.min.css" rel= "stylesheet" >

When the JS file is loaded: JS content is embedded in the document, the browser resolves, and the browser's rendering is paused until the resource has finished loading. (This is also if we put the JS file in the header, because the reason for the load JS, the page will always come out a few seconds)

When loading a CSS file: page parsing is not paused and will not cause the next style to load because of a single error.

A small summary of 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.