3 questions per day (35)

2020/4/10

problem

HTML: Briefly describe the difference between src and href

What are the values ​​of CSS: display? Explain their role

JavaScript: 5. Scope chain 6. Interpreting this from the ECMAScript specification

HTML: Briefly describe the difference between src and href

src is used to replace the current element, and href is used to establish a connection between the current document and the referenced resource.

src is the abbreviation of source. It points to the location of external resources. The pointed content will be embedded in the location of the current label in the document; when the src resource is requested, the resource pointed to will be downloaded and applied to the document, such as js script, img picture And frame elements. When the browser parses this element, it will pause the downloading and processing of other resources until the resource is loaded, compiled, and executed, as are the elements such as pictures and frames, similar to embedding the pointed resource into the current tag. This is why the js script is placed at the bottom instead of the head.

href is the abbreviation of Hypertext Reference, pointing to the location of network resources, establishing a link with the current element (anchor) or the current document (link), if we add in the document

<link href="common.css" rel="stylesheet"/>Then the browser will recognize the document as a css file, it will download resources in parallel and will not stop processing the current document. This is why it is recommended to use link to load css instead of @import.
link

What are the values ​​of CSS: display? Explain their role

Insert picture description here

JavaScript: 5. Scope chain 6. Interpreting this from the ECMAScript specification

Scope chain

Scope chain

Interpretation of this from the ECMAScript specification

This is awesome, recommend intensive reading

Published 49 original articles · Like1 · Visitors 1076

Guess you like

Origin blog.csdn.net/weixin_44194732/article/details/105425463