What is the difference between href and src in HTML? An introduction to the difference between href and src in HTML

Source: Internet
Author: User
What is the difference between the href and src in this article? The difference between the href and src in HTML is introduced, there is a certain reference value, the need for friends can refer to, I hope to help you.

Href:

HREF is an abbreviation for hypertext reference, which represents a hypertext reference. Used to establish a link between the current element and the document. Commonly used are: link, a.

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.

Src:

SRC is the abbreviation of source, and the content of SRC is an essential part of the page that is introduced.

The content that SRC points to is embedded in the document where the current label is located. Commonly used are: IMG, script, iframe.

When the browser resolves to the element, it pauses the browser's rendering, knowing that the resource is loaded.

This is also the reason to put the JS script at the bottom instead of the head.

Related Article

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.