Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > HTML/XHTML

  • Print
  • + Share This
This chapter is from the book

Adding Comments

You can add comments to your (X)HTML documents in order to remind yourself (or future editors) what you were trying to achieve with your (X)HTML tags. These comments only appear when the document is opened with a text editor. They are invisible to visitors in the browser.

To add comments to your HTML page:

  1. In your (X)HTML document, where you wish to insert comments, type <!--.
  2. Type the comments.
  3. Type --> to complete the commented text.
Figure 3.23

Figure 3.23 Comments are a great way to add reminders to your text. You can also use them to keep track of revisions.

Figure 3.24

Figure 3.24 Comments are invisible (though they readily appear when the source code is displayed—see page 53).

  • + Share This
  • 🔖 Save To Your Account