Skip to main content

Practical Exercise 14: HTML Comments

Learn how to use HTML comments to document your code, facilitate its maintenance, and improve collaboration among developers. This practical exercise is ideal for beginners.

Activity

Add comments to an HTML document.

Interactive Solution

Solution with complete HTML code

HTML
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8" />
<title>Comentarios</title>
</head>
<body>
<!-- Este es un comentario en HTML -->
<p>Este párrafo está visible.</p>
<!-- <p>Este párrafo está comentado y no se verá.</p> -->
</body>
</html>