Tell me about HTML comments

Asked By 30 points N/A Posted on -

Hello, can anyone tell me about HTML comments? How does it work? Why it does use? If anybody know about it please describe.

Best Answer by Emmanuel Kobu
Answered By 0 points N/A #163253

Tell me about HTML comments



It is an important piece of topic in HTML. It use for the html coder who write code. HTML code is not seen in the web page but written in raw code.

The syntax of HTML comment is:

<!–     –>


<! – – this sentence will be hidden in web site –>.


Best Answer
Best Answer
Answered By 0 points N/A #163254

Tell me about HTML comments


Hi Michelle.

Html code is used to hide scripts from browser  so that no one will see the plain text. It is used to provide important information about the code or comments from the coder and to hide portions of the page that can be use in the future. In writing a comment you should use the syntax:

Less than sign(<), followed by exclamation point(!), followed by 2 hypens(–), your comment, and another two hypen(–) and the greater than sign(>)

<!—(comment hidden)–> 


Answered By 590495 points N/A #163255

Tell me about HTML comments


The HTML tag <!–…–> is used to insert comments in the source code of the page. It’s best used to indicate the purpose or explain the code. If your page contains lots of codes, you can insert it to a group of codes and explain what the codes are for or what does it do.

You can put any text inside the tag since it will not appear in your page when displayed by the browser. You will only see it when editing or accessing the page source code. See the examples below.

  • <!–You can place any texts inside the comment tag–>
  • <!–start of JavaScript rotation–>
  • <!–Display image–>

Another HTML tag you can use is <abbr>. This tag is supported in all major web browsers. It is used to indicate an acronym or an abbreviation. Unfortunately, this tag is not supported in Microsoft Internet Explorer 6 and older versions. Additionally, you can use the “title” attribute to display the complete meaning of the abbreviation. This tag is used with an end tag, <abbr></abbr>.

  • <abbr>WWW</abbr>
  • <abbr title=”World Wide Web”>WWW</abbr>
  • Do you know the meaning of the letters <abbr title=”World Wide Web”>WWW</abbr>?


  • Do you know the meaning of the letters WWW?

Login/Register to Answer

Related Questions