Comment tag in HTML

Definition and usage

Comment tags used to insert comments and comments in the code. These comments will not be displayed on the browser.

Using comments next to the code makes it easy to understand, control and fix errors for your work more quickly and conveniently. This tag is especially useful if you have lots of code and long code.

Browser support

Comment tag in HTML Picture 1

Comment tag in HTML Picture 2 Comment tag in HTML Picture 3 Comment tag in HTML Picture 4 Comment tag in HTML Picture 5

There is no difference of this tag between HTML 4.01 and HTML5.

Structure

Structure a comment in an HTML file:

Note : There is an exclamation point (!) In the opening tag, but not in the closing tag.

For example






TipsMake.com


Knowledge - Experience - FAQ





Results returned:

 TipsMake.com 
Kiến thức -Kinh nghiệm - Hỏi đáp
4.5 ★ | 2 Vote

May be interested

  • Text in HTMLText in HTML
    the element in html is used to define a paragraph of text.
  • How to Use Text Color Tags in HTMLHow to Use Text Color Tags in HTML
    this article explains how to change the font color in html documents. although the html style tag is obsolete in html5, you can use css to color content on an html page. if you use an older version of html, you can use the html text color tag as needed.
  • Format text in HTMLFormat text in HTML
    format elements in html help determine the style and importance of text.
  • Elements in HTMLElements in HTML
    the html element usually goes in pairs, including the opening tag, closing tag, and the content inside the two tags.
  • Symbol - Icon in HTMLSymbol - Icon in HTML
    html has many mathematical, technical and monetary symbols that cannot be used to write.
  • Syntax and Selector in CSSSyntax and Selector in CSS
    css rules set includes selector (selector) and declarative block (declaration).
  • How to comment using Gif animation on FacebookHow to comment using Gif animation on Facebook
    newly updated facebook adds new features that allow commenting posts with animations, with many different topics.
  • Common HTML mistakes that you should avoid for better web programmingCommon HTML mistakes that you should avoid for better web programming
    learning html is not difficult, but when running it in the browser, errors often occur. here are common html errors and how to handle them for better web development.
  • How to insert spaces in HTMLHow to insert spaces in HTML
    this tutorial explains how to insert spaces and line breaks in html. because no matter how many times you type a space, html will display a space so to insert more than one space, you will need to use the html tag.
  • Image img in HTMLImage img in HTML
    when you visit the website, you will often see images of all sizes and positions on the page. images in html web pages will help to enrich the content as well as increase the aesthetics of the page.