6/27/20

HTML COMMENTS :- Single line and Multiline


HTML COMMENTS

In Html, Comments are the text or sentence that is written in your Html documents.

They are not displayed by the browser. The browser would ignore it.

The comment appears only in your Html documents. They are not rendered or shown by the browser.

Why We Use Html Comments

It is good practice for both programmers and beginners to write comments in his Html documents.
The comment is a type of code that tells the programmer or web developers what this code is going to do or why this code is written.

How to write Html Comment?

An Html comment starts with <!-- and ends with -->. Notice that an exclamation point (!) on the starting tag but not on the ending tag. An exclamation point (!) is placed only on start-tag, not on the end tag.

<!-- Comment goes here -->

Single line comments

Comment which comes only on one line is known as Single line comments. Example of single-line comment is below:-

EXAMPLE:- 

<p> This is Paragraph tag. </p>  <!--  This is a Comment -->

OUTPUT:-


Multiline Comments

We have talked about single line comments so far, but you can also comment through multiple lines. Html also supports multi-line comments. You have just put <!-- on the start tag and --> on the end tag. Let’s see through an example

EXAMPLE:-

<body>
<p> This is Paragraph tag. And this is an example of  multiline comment.  </p> 
<!--  
This is an example of a multiline comment. 
-->
</body>

OUTPUT:-



So that it for today guys. I hope you liked the article as well as Html Series. Thank you for your huge support. If you have any quarries related to this article comment below or DM on my social media.

Have a Good day.

PEOPLE ALSO READ:- HTML TEXT FORMATTING
PEOPLE ALSO READ:- HTML STYLES : FULL EXPLAIN


"+y+""}else{if(A==5){c+='
  • '+w+""+y+"
  • "}else{if(A==6){c+='
  • "+w+'
    '+u+""+y+"
  • "}else{c+='
  • "+w+"
  • "}}}}}s.innerHTML=c+=""+y;d.callBack()};randomRelatedIndex=h;showRelatedPost=g;j(d.homePage.replace(/\/$/,"")+"/feeds/posts/summary"+e+"?alt=json-in-script&orderby=updated&max-results=0&callback=randomRelatedIndex")})(window,document,document.getElementsByTagName("head")[0]); //]]>

    0 comments:

    Post a Comment

    Follow on Twitter

    Linkedin

    Categories

    Contact Form

    Name

    Email *

    Message *

    Mad About Computer. Powered by Blogger.
    This site is in no way affiliated with or endorsed by specified business. It exists as a compendium of supporting information intended for informational purposes only. If you want to buy this website, please don't hesitate to contact us via e-mail: "d e n a c c 9 7 7 (at) g m a i l (dot) c o m" (delete spaces) or you can find and buy it on Afternic domain auctions.