Tech moves fast! Stay ahead of the curve with Techopedia!
Join nearly 200,000 subscribers who receive actionable tech insights from Techopedia.
A Hypertext Markup Language comment (HTML comment) is written by a Web developer and acts as a reference during a development project. A developer is able to view HTML comments during development, but this code cannot be seen by website users. Comments can be included within many file types, including HTML, XML and CSS.
HTML comments are commonly used to explain complex table structures or provide documentation of a development project.
Most programming languages and environments include comments, which may serve any of the following functions:
The last listed function is quite useful when unconfirmed code is verified and later turned into an essential part of the project. When this occurs, the developer removes the comment symbols, and the previously hidden code becomes functional.
There are numerous recommendations on writing comments. For example, developers should use simple words as often as possible, as a comment is meant to make code more understandable. Before continuing a project, all earlier comments should be double-checked.
Certain developer tools support the easy inclusion of comments. Example tools are Dreamweaver page notes and FrontPage file summary.