" comment tag to invalidate a piece of code. Using this tag, you can turn the code wrapped in the tag into comment content, which will not be displayed in the browser or It affects other codes, and the syntax is ""."/> " comment tag to invalidate a piece of code. Using this tag, you can turn the code wrapped in the tag into comment content, which will not be displayed in the browser or It affects other codes, and the syntax is "".">
Home >Web Front-end >Front-end Q&A >How to invalidate a piece of code in html5
In html5, you can use the "" comment tag to invalidate a piece of code. Use this tag to turn the code wrapped in the tag into a comment content, and then it will not be displayed. In the browser, it will not affect other codes, and the syntax is "".
The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.
html5How to invalidate a piece of code
In HTML, you can use comment tags to wrap invalid code.
Comment tags are used to insert comments in source code. Comments will not be displayed in the browser.
You can use comments to explain your code, which will help you edit the code at a later time. Especially useful when you write a lot of code.
It is also a good practice to use comment tags to hide scripts that are not supported by the browser (so that the script is not displayed as plain text).
The example is as follows:
<html> <body> <!--这是一段注释。注释不会在浏览器中显示。--> <p>这是一段普通的段落。</p> </body> </html>
Output result:
Recommended tutorial: "html video tutorial"
The above is the detailed content of How to invalidate a piece of code in html5. For more information, please follow other related articles on the PHP Chinese website!