-
Hajipur, Bihar, 844101
Hajipur, Bihar, 844101
HTML5 Basics
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Styling and Design
HTML Links and Media
HTML Layout and Structure
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
HTML Graphics
HTML APIs
HTML Advanced Topics
HTML comments are lines in your HTML code that are not displayed in the browser. They are used to:
Explain the code
Leave notes for yourself or other developers
Temporarily disable parts of code during testing
<!-- This is a comment -->
<!-- This is a heading section -->
<h1>Welcome to My Website</h1>
You can use comments to disable code without deleting it.
<!-- <p>This paragraph will not be shown.</p> -->
<!--
This is a multiline comment.
It will not be displayed in the browser.
Use it to explain complex code.
-->
✅ Inside <body>
or <head>
✅ Before or after elements
✅ Inside complex blocks of HTML code
To help others understand your code
To test code by disabling specific sections
To organize code with section labels
Don’t overuse comments — write clean code instead
Keep comments short and meaningful
Avoid leaving unnecessary commented-out code in final version
Q1. Add a comment saying “Header section” before an <h1>
tag.
Q2. Write a comment above a paragraph describing the content.
Q3. Disable a <div>
element using a comment.
Q4. Write a multiline comment explaining your HTML layout.
Q5. Add a comment to separate the header and footer sections.
Q6. Use a comment to explain a link’s purpose.
Q7. Comment out an image tag and check it disappears.
Q8. Place a comment inside the <head>
tag.
Q9. Use comments to label different sections of a web page.
Q10. Write a comment inside a form describing each input field.
HTML5 Basics
HTML Introduction
HTML Editors
HTML Basic
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Styles
HTML Formatting
HTML Quotations
HTML Comments
HTML Styling and Design
HTML Links and Media
HTML Layout and Structure
HTML Tables
HTML Lists
HTML Block & Inline
HTML Div
HTML Classes
HTML Id
HTML Head
HTML Layout
HTML Responsive
HTML Computercode
HTML Semantics
HTML Forms
HTML Forms
HTML Form Attributes
HTML Form Elements
HTML Input Types
HTML Input Attributes
Input Form Attributes
HTML Graphics
HTML APIs
HTML Advanced Topics