HTML Comments

HTML Comment Tag

HTML comments are not shown in the browser, but they can help you document your HTML source code.

  • You can add notifications and reminders to your HTML code with comments.
  • Comments can be used to hide content.
  • This can help if you want to hide content for a short time.
  • More than one line can also be hidden. Everything between the!— and the –> won\’t show up on the screen.
  • You can hide parts of the HTML code by using comments.
  • Comments are also great for debugging HTML, since you can turn off one line of HTML code at a time to look for mistakes.

You can use the following syntax to add comments to your HTML source:

<!DOCTYPE html>
<html>
<body>

<p>your text here .</p>
<!–
comment html code

<p>Look at this cool image:</p>
<img border=\”0\” src=\”pic_trulli.jpg\” alt=\”Trulli\”>
–>

<p>This is a inline <!–comment–> example.</p>

<!–HTML Comment Tag–>

</body>
</html>

Related Posts
Introduction to HTML

HTML Introduction HTML is the most common language used to mark up Web pages. What does HTML mean? Hyper Text Read more

What is HTML

HTML stands for Hyper Text Markup Language, which is a programming language used to make web pages and web apps. Read more

HTML Basic Examples

In this chapter, we\'ll show you some simple examples of HTML code. Don\'t worry if we use tags that you Read more

HTML text Editors

Editors for HTML text HTML files are text files, so any text editor can be used to make them. Text Read more

HTML Tags

Learn HTML Tags HTML tags are kind of like keywords that tell a web browser how to format and show Read more

HTML Elements

Elements make up an HTML file. These elements are what make web pages and tell you what content is on Read more

HTML Attributes

Attribute in HTML Attributes in HTML are special words that tell you more about an element. Attributes change the way Read more

HTML Headings

Headings in HTML The <h1> to <h6> tags are used to set up headings in HTML. <h1> shows which heading Read more

Scroll to Top