Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use Shortcut Keys to annotate html5

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how html5 uses keyboard shortcuts to achieve annotations, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

In html5, you can use the "ctrl+/" shortcut to achieve comments, select the code that needs to be commented, and after using the shortcut, the specified code will be wrapped up to form a comment code, and click the shortcut key again to uncomment the code.

The operating environment of this tutorial: windows10 system, HTML5 version, Dell G3 computer.

In html5, you can use ctrl+/ shortcuts to annotate code.

Examples are as follows:

Annotative content is not displayed in the browser, and the browser automatically skips comments when parsing html code, so the annotated content is actually for the programmer to see, not displayed on the page.

But in the actual development process, adhere to the key code comments is a good programming habit, because in practice, there are usually many colleagues to work together to complete the development of a project, reasonable comments can help colleagues to see that your code can quickly understand what that part of your code does, improve development efficiency, and reduce the cost of later maintenance. So when you write a function or a more complex business logic, don't forget to comment.

Another question is whether it is a bit troublesome to write directly in the actual development process. Now most editors provide shortcut keys for you to quickly comment on a sentence or piece of code. If you also use VScode as I do, you can use "Ctrl+/" to quickly comment one line. If you need to comment multiple lines, select multiple lines directly and execute the shortcut key to complete the comments. Of course, you can uncomment if you can. Uncomment you can uncomment just by performing "ctrl+/" again with what you did when you commented the code.

The above is all the content of the article "how to use keyboard shortcuts to annotate html5". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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: 248

*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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report