HTML5 Reference

HTML5 <!--...--> (comment) tag

Definition

The <!--...--> (comment) tag allows us to document our code with useful comments and is ignored by browsers. Just replace the ellipses with the comments you want to enter. The tag can be used multiples times in a HTML document.

Example



<!DOCTYPE html>   <!-- The DOCTYPE declaration always comes first in a HTML document --> 
<html>
<!-- The Basic Structure of a HTML document follows -->
<!-- Everything else goes between the start and end HTML tags. -->
 

<html lang="en">
<!-- The header contains meta information pertaining to the HTML document as well as a title and other stuff we will discuss in HTML5 Intermediate/Advanced lessons. External files such as CSS stylesheets and JavaScript files are also imported in the header section of our HTML file. -->

  <title>A Title which will appear in the Windows title bar.</title>
</head>

<body>
<!-- The content of the web page appears in the body section. -->

</body>

<!-- We complete the HTML file with the closing HTML tag. -->
</html>

<!--...--> (comment) Specific Attributes

N/A

Global Attributes

N/A

Event Attributes

N/A