Comments are expressions or reactions about something given by someone or general audience.
HTML Comments are used for explaining the behaviour or the progress of a task or a process written by other users for better understanding.
HTML Comments are not visible in the browser screen but are defined in the HTML source code for reference. Adding comments is considered as a good practice in HTML source code.
HTML comments are placed in-between < !-- ..... --> tags. Any content placed within < !-- ..... --> tags will be considered as comment and will be completely ignored by the browser.
Comments mustn’t be nested specified a comment cannot be placed within another comment. The double-dash sequence "--" should not appear inside a comment however enclosed as a part of the closing --> tag. There should not be any spaces in the starting comment string.
Single line comment are added by the special beginning tag <!-- and ending tag → placed before and end of the first line.
< !-- This is single line comment -->
Multiple line comments are added by the special beginning tag <!-- and ending tag --> placed before the first line and end of the last line.
<!--
                    This is a multiline comment and it can
                span through as many lines you like.
-->
Few browsers allows
<body>
                   
<p>This is <comment>not</comment> using comment tag.</p>
</body>
Knowledge2life is best learning website.
Knowledge2life is best learning website.
|