HTML Tutorial – Comments

HTML tags are used to add comments to the HTML source code.

The syntax for HTML comment is

<!-- write HTML comments here -->

HTML Comments Example

<!DOCTYPE html>
<!-- This is a comment -->
<p>This is a paragraph.</p>
<!-- Browsers do not render comments -->
Try it yourself »

HTML comments are not being rendered by the browsers. This means you can add as many comments as you want. People usually use HTML comments to place notifications and reminders.

Conditional Comments

Conditional comments defines some HTML tags to be executed by Internet Explorer only. To keep this tutorial simple, we will skip this topic.