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
Table of contents 1. Install the proxy module 2. ...
Table of contents Typical waterfall website Water...
Table of contents 1. JavaScript Objects 1).Array ...
Table of contents Nesting Parent-child component ...
This article uses an example to describe how MySQ...
This article example shares the specific code of ...
During the daily optimization process, I found a ...
Because the project needs to use https service, I...
To draw a table in HTML, use the table tag tr me...
1. Build the basic image of jmeter The Dockerfile...
This article example shares the specific code of ...
1. Install Howdy: howdy project address sudo add-...
Text hiding code, hide a certain text in HTML Copy...
Table of contents 1. Operation elements 1.1. Chan...
Copy code The code is as follows: <div style=&...