HTML Comments — Complete Guide
HTML Comments — Complete Guide: free step-by-step lesson with examples, common mistakes, and interview tips — part of HTML Tutorial on Toolliyo Academy.
On this page
HTML Tutorial · Lesson 10 of 100
HTML Comments
Basics → Forms & semantics → APIs & performance → Projects
Basics · 1 — Structure & media · ~6 min · HTML — Foundations
What is this?
Comments are ignored by the browser display but visible in source.
Why should you care?
MarkupVerse teams leave short section markers — not huge commented-out dead code.
See it live — copy this example
Save as demo.html and open in your browser, or use Run Example below.
<!-- Hero -->
<section class="hero">...</section>
<!-- TODO: replace placeholder rates before launch -->
<!--
<p>Old banner</p>
-->
Run Example »
Edit the code below and click Run to see the result in Toolliyo’s live editor.
What happened?
- Comments do not hide secrets — users can view source.
- Don’t commit passwords in comments.
Practice next
- Comment a section label.
- Comment out a paragraph.
- View source to confirm.
- Remove an obsolete TODO.
- Add a comment before footer.
Remember
Source-only notes. Not for secrets. Keep comments short.
MarkupVerse section markers
Hero/footer marked in source.
Outcome: Easier handoff in reviews.
Interview prep for this lesson
Practice these questions aloud after reading—each links to a full structured answer.
Sign in to ask a question or upvote helpful answers.
No questions yet — be the first to ask!