Replaced and non-replaced elements

1. Replacement element: The browser will determine the specific display content of the element according to its label and attributes.

The replacement element itself is an empty box, and the browser displays its corresponding content according to its attributes. It's as if the empty box is replaced with the content corresponding to the attribute. For example, the input tag determines different displays according to different assignments of the type. If the assignment is text, the browser will replace the empty box with a text box; if it is radio, the browser will replace the empty box with a radio box.

Common replacement elements:

input、img、video、iframe等

2. Non-replacement element: The browser directly displays its content and will not replace it.

Such as the span element, if you do not set content for the span element, it will not appear on the page. When you set text such as Hello World, it will display this text on the page.

Guess you like

Origin blog.csdn.net/qq_48113035/article/details/123284954