KnowledgeBoat Logo
|

Computer Applications

How are comments inserted in HTML code ? Explain with example.

HTML Intro

3 Likes

Answer

Comments are inserted in HTML code by enclosing them in <!-- and --> tags. For example,

<BODY>
<!-- Body tag starts here -->
This is the document body.
</BODY>

Here, the text "Body tag starts here" is enclosed in <!-- and --> and thus, it is regarded as comment and not displayed in the web browser.

Answered By

2 Likes


Related Questions