In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces "how to use html5 comment tags". In daily operation, I believe many people have doubts about how to use html5 comment tags. Xiaobian consulted all kinds of materials and sorted out simple and easy-to-use methods of operation. I hope it will be helpful to answer the doubts about "how to use html5 comment tags". Next, please follow the editor to study!
Everything between html5 comment tags is treated as comments, syntax; comments are also part of the code, but the browser automatically ignores the contents of comments, so users cannot see comments on the page.
The operating environment of this tutorial: windows7 system, HTML5 version, Dell G3 computer.
HTML comments are mainly used to explain the code in the document, comments are also part of the code, but the browser will automatically ignore the contents of the comments, so users can not see the comments in the web page.
We should make good use of comments when writing code, because a complete HTML document is often made up of hundreds of lines of code, and when we want to modify some part of it, it can take a long time to find what we want to change. With comments, it is different. We can divide the program into several parts according to functions or other conditions and mark them with comments, which can help you and others read your code and improve the readability of your code.
Single-line comment
In HTML, you can use to add comments to your code, and everything in between is treated as comments. The sample code is as follows:
How to write HTML comments
Welcome to the HTML tutorial, please remember the address: https://www.yisu.com/
The running result is as follows:
Comments can appear anywhere in an HTML document, including the beginning of the document, the end of the document, the middle of the document, the outside of the tag, and the content of the tag.
Multiline comment
What we demonstrated earlier is mainly single-line comments, which also support multi-line comments in HTML. There is not much difference between multi-line comments and single-line comments, we just need to make sure that the contents of the comments are in between, as follows:
Use comments not only to explain the code, but also to comment out the code in the program, for example, when you don't want a piece of code to execute, you can comment it out first, so that the browser will not execute the code.
At this point, the study on "how to use html5 comment tags" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.