Home > Web Front-end > HTML Tutorial > What is the difference between href and src in html? Introduction to the difference between href and src in html

What is the difference between href and src in html? Introduction to the difference between href and src in html

不言
Release: 2018-09-10 14:38:01
Original
3447 people have browsed it
The content of this article is about what is the difference between href and src in html? The introduction to the difference between href and src in HTML has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

href:

href is the abbreviation of Hypertext Reference, which means hypertext reference. Used to establish a link between the current element and the document. Commonly used ones are: link, a.

The browser will recognize the document as a css document, download the document in parallel, and will not stop processing the current document.

This is also the reason why it is recommended to use link instead of @import to load css.

src:

src is the abbreviation of source. The content of src is an essential part of the page and is the introduction.

The content pointed to by src will be embedded in the document at the location of the current tag. Commonly used ones are: img, script, iframe.

When the browser parses this element, it will pause the browser's rendering until the resource is loaded.

This is also the reason why the js script is placed at the bottom instead of the head.

Related recommendations:

The difference between src and href attributes

html Empty link href="#" and href= The difference between "javascript:void(0)"

The above is the detailed content of What is the difference between href and src in html? Introduction to the difference between href and src in html. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template