<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>HTML Comments Example</title>
</head>
<body>
<!-- This is a comment explaining the purpose of the page -->
<h1>Welcome to My Website</h1>
<!-- TODO: Add more content later -->
<p>This is a sample paragraph.</p>
<!--
Multi-line comments
can span across
multiple lines
-->
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Single-Line Comments Example</title>
</head>
<body>
<!-- This is a single-line comment describing the main heading -->
<h1>Welcome to My Web Page</h1>
<!-- Navigation menu section -->
<nav>
<ul>
<!-- Home link -->
<li><a href="#">Home</a></li>
<!-- About link -->
<li><a href="#">About</a></li>
<!-- Contact link -->
<li><a href="#">Contact</a></li>
</ul>
</nav>
<!-- Main content area -->
<main>
<!-- Paragraph with additional context -->
<p>This is an example of using single-line HTML comments.</p>
</main>
</body>
</html>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Multi-Line Comments Example</title>
</head>
<body>
<!--
This is a multi-line comment
demonstrating how to write
comments that span multiple lines.
You can include:
- Detailed explanations
- TODO notes
- Code documentation
- Temporary code blocks
-->
<h1>Welcome to My Web Page</h1>
<!--
Temporarily disabled section
<div class="hidden-content">
<p>This content is currently hidden using a multi-line comment.</p>
</div>
-->
<main>
<!--
Project Description:
This is a sample webpage to demonstrate
the use of multi-line HTML comments
in web development.
-->
<p>Learning HTML comments is an important skill for web developers.</p>
</main>
</body>
</html>
We use cookies for a number of reasons, such as keeping the website reliable and secure, to improve your experience on our website and to see how you interact with it. By accepting, you agree to our use of such cookies. Privacy Policy