HTML / CSS / JavaScript Tutorial

HTML Tutorial

4. Commenting

[this page | pdf | back links]

It can be helpful to include comments in HTML documents that are not displayed but help readers of the underlying markup text you to understand what the HTML is trying to do. Comments in HTML take the form <!-- comment --> and ignore line breaks within the opening and closing tags of the comment element.

For example, markup as follows:

<!-- material explaining how commenting in HTML

creates the following output (i.e. nothing):

Contents | Prev | Next | HTML

Desktop view | Switch to Mobile