Simply put, src means "I want to load this resource", and href means "I want to associate with this resource" src is mainly used for element replacement, and href is used to establish relevant links with related documents and external resources. The href attribute indicates that a link is established between the local web resource and the defined resource. like: <link href="style.css" rel="stylesheet"/> The browser knows that this resource is a style sheet and will not stop parsing when it reaches this element, but rendering the page may stop because the browser needs style rules to render the page. The browser will not load the CSS file content into the style tag. Therefore we recommend using the link tag instead of @import to load style sheets. The src attribute will embed the corresponding resource into the current page. like: <script src="script.js"></script> When the browser loads and processes the page, it will find script.js and compile the JS. Only then will the subsequent page compilation and parsing work continue. The JS content will be loaded into the script tag. This is very similar to the img tag. When the browser parses the img tag, it will load the corresponding image and put it into the img tag. This is why the jS file should be loaded last in the document. Before the label. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. |
<<: MySQL json format data query operation
>>: Implementation of Docker container state conversion
In daily work, we sometimes run slow queries to r...
Table of contents 1. Configure Vue front end 1. D...
Table of contents Preface Is the interviewer aski...
1. Introduction Sometimes, after the web platform...
This article shares the specific code of JavaScri...
Click here to return to the 123WORDPRESS.COM HTML ...
p>Manually start in "Services" and i...
background On mobile devices, caching between pag...
I plan to realize a series of sticky note walls. ...
First: Start and stop the mysql service net stop ...
1. Install nginx in docker: It is very simple to ...
Table of contents 1. Overview 1.1 Creating a func...
1. Record several methods of centering the box: 1...
PHP7 has been out for quite some time, and it is ...
The file name of the dynamic library file under L...