<!--...--> HTML Comment Tag

<!--...---> is a comment tag, which is used to give the comment in your HTML source code.
  • 2784

Introduction

The HTML 'comments' tag is used for creating comments within your HTML code. Comments are not displayed in the browsers. we can use comments to explain our code. It is very useful when we open the code at some other day or date. To see the comment we easily understand whats the code of line means. The opening tag for comment is <!-- and closing tag is -->. Everything between these two tags can become comment.

For example

<!--Hi! In this article I explain how we write the comment in HTML-->

Lets take a closer look of comment through the following example

<html>

<head>

    <title></title>

</head>

<body>

    <!--<b> tag is used to make the text bold.-->

    <b>Hello</b>

    <!--<i> tag is used to make the text italic-->

    <i>Hello</i>

    <!--<u>tag is used to make the text underline-->

    <u>Hello</u>

</body>

</html>

 

Output
 

Hello Hello Hello

 

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

 

© 2019 DotNetHeaven. All rights reserved.