1.4.19- comment tag of HTML tags

Sometimes we enter the code, let others see you, people do not know your ideas might not understand, or, or a period of time and that they do not understand, and this time we need to annotate the code to explain our code What does it mean:

<! DOCTYPE HTML > 
< HTML lang = "EN" > 
< head > 
    < Meta charset = "UTF-. 8" > 
    < title > the Document </ title > 
    < Base target = "_ Bank" > 
</ head > 
< body > 
    < h2 > comment tags </ h2 >    <-! this is the comment tags -> 
    1. multi-use comment tag is very good coding practices.   < Br /> 
    2. The content of the comment tag which is to give the programmer to read. The browser is not performed. 
</body>
</html>

In the browser opens as follows:

We found that green font is not resolved browser:

This is because the browser does not parse the comment tags, how to do your own code comments? You can use the keyboard to enter <! - ->, can also be directly shortcut, Ctrl + / direct comment your code. 

We can take the browser to open Sina home page, press F12:

Sina can see a lot of the code is annotated. This will let you know about the meaning of the code.

 

Guess you like

Origin www.cnblogs.com/Chamberlain/p/11111682.html