Computer Science, asked by creamiepie, 1 year ago

Heya friend ✋✋

please help me in this question..↙↙


◆Explain two types of comments in HTML file?


◆NO SPAMMING PLEASE★★
◆CONTENT QUALITY ANSWER REQUIRED★★

Answers

Answered by dhruvbadaya1
0

There are two types of comments in HTML:-

•HTML Comments
For example, <!--This is a comment. Comments are not displayed in the browser-->

These comments are placed between <!-- and --> tags. This is an empty element, and is used in body tag.

•JAVASCRIPT Comments
For example, // This is a comment:

These comments are placed between // and :. This is not an element and is used in script tag.

Answered by Anonymous
0

HI,

First of all there is only one type of comment syntax in html that is <!-- your comment here -->

You can use this syntax to add single or multiple line comment

single line comment:

<!-- This is an example of single line comment -->

multiple line comment:

<!-- This is an example of single line comment

This is second line of multiple line comment example

Hope you understand

-->

But remember if you are using <script> tag and you have JavaScript code in it you have to use // add comment in code <!-- --> will not work.


Similar questions