system automatically removes add code in CSS/HTML's interface

Viewed 140

Admin -> Customize -> CSS/HTML's interface add code

<meta name="baidu-site-verification" content="codeva-y7g9gv0oeg" />

The system automatically removes the /

1 Answers

This is due to some differences in the way single-tab elements are written in the HTML standard.

In the HTML standard, some tags are defined as single-tag elements (Self-Closing Tags). They do not require closing tags, but appear in a self-closing form. For example <meta>, <br>, <img>, etc.

According to the HTML5 specification, these single-tab elements can be written without the closing tag / symbol. Therefore, when displayed in the browser console, in order to simplify the display, the / symbol is usually omitted, such as <meta charset="utf-8">.

However, when viewing the source code of a web page, the browser will try to display the complete HTML code according to the specification, including the self-closing form of the single-tab element. Therefore, when you view the source code of a web page, you will see <meta charset="utf-8" />, where the / symbol is the complete self-closing form.

This difference is because in the browser console, some redundant content is omitted in order to simplify the display, while in the web page source code, the complete tag form is displayed as much as possible so that developers can better understand and analyze the structure of the web page.

It should be noted that this difference is only a display difference and will not affect the rendering and functionality of the web page.