saftutorials.com
HTML Comment Tutorial

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.

Basic Structure of 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>

HTML Comment with Condition
<!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>

Find us on

Facebook Google Plus Twitter Pinterest YouTube

web statistic