Skip to content Skip to sidebar Skip to footer

HTML comment

    HTML comments are non executable lines, it is used to write a notes about the following code. Browser not execute this comment lines.

Types of Comments:-
  i) Single or Multiline Comments
  ii) Conditional Comments

i) Single or Multiline Comments :
   Used to hide a line or multi-line from the execution, comments are define inside the <!-- and --> tags.

Syntax:-
<!-- User Comments-->
           or
<!-- User  ----------------------------------------------------
------------------------------------------------Comments -->

Conditional Comments :-
    Conditional comments are executed by Internet Explorer browsers only, other browser will not execute this type of comments they consider normal comments.

Syntax :-
<!-- [if IE 10]>
----- Write HTML codes here
<![endif]-->



Example Program:- (Editor)



Output:-








Advertisement


Screen Shots:-

Internet Explorer and html comments

Post a Comment for "HTML comment"