HTML Home
HTML Introduction
HTML Editors
HTML TAGS
HTML Paragraph
HTML Heading
HTML with CSS
HTML Text Formatting
HTML Quotation
HTML Comment
HTML Links
HTML Images
HTML Audio
HTML Video
HTML Tables
HTML Lists
HTML Class
HTML Iframes
HTML File Path
HTML Scripts
HTML Head Section
HTML Structure
HTML Symbols
HTML Character Set
HTML Entity
HTML Color Codes
HTML Forms
HTML Forms
HTML Form Elements
HTML5 Form Element
HTML Form Attributes
HTML Others
What it is HTML Comment?
HTML comment tag is tag that use for hidden text that don't show on browser display but also show HTML view source code.
How to use HTML Comment?
All programming language support hidden comment in programming coding area. Like C, C++, C#, PHP, ASP, CSS and also HTML. And you know some programming comment system are same and some different.
HTML Comment use this system
<!-- HTML comment here -->
Why use HTML comment?
When you design a website using HTML. Then if you want to hidden text that only see code mode but not display in browser then you can use HTML comment.
<!DOCTYPE html> <html lang="en"> <head> <title>HTML Comment Tutorials</title> </head> <body> <!-- Your HTML comment here --> <p>Lorem ipsum dolor sit amet.</p> <!-- / Your HTML comment here --> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <title>HTML Comment Tutorials</title> </head> <body> <!--[if IE]> This comment for IE <![endif]--> <!--[if IE 6]> This comment for IE 6 <![endif]--> <!--[if IE 7]> This comment for IE 7 <![endif]--> <!--[if IE 8]> This comment for IE 8 <![endif]--> <!--[if IE 9]> This comment for IE 9 <![endif]--> <!--[if gte IE 8]> This comment for IE 8 or higher <![endif]--> <!--[if lt IE 9]> This comment for IE lower than 9 <![endif]--> <!--[if lte IE 7]> This comment for IE lower or equal to 7 <![endif]--> <!--[if gt IE 6]> This comment for IE greater than 6 <![endif]--> <!--[if !IE]> --> This comment for not IE 5-9 <!-- <![endif]--> </body> </html>