How to Comment in HTML

By eHow Internet Editor

Rate: (0 Ratings)

HTML code can be confusing, even to the original writers. Adding comments to your HTML is a good idea in case you need to go back and understand the logic that was at work back when it was first written. Comments can also be useful in marking parts of code that aren't working correctly or to make notes for future development.

Instructions

Difficulty: Moderately Easy

Things You’ll Need:

  • HTML or text file editor

Insert a Comment

Step1
Open your HTML editor and access the page you're building or maintaining. You'll want to click on the exact area where you plan on inputting the comments.
Step2
Type the following:
Step3
Switch "These are my comments" with whatever text you want to use as a comment.

Tips & Warnings

  • Keep comments as short and concise as possible. Their purpose is to aid understanding, not clutter the page.
  • Nothing you type in a comment field will display to the reader, although if a user views the page source code, the comments will be visible. Don't put anything you expect to remain truly confidential in a comment.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Comment in HTML

eHow Internet Editor

eHow Internet Editor

Category: Internet

Articles: See my other articles

Related Ads

Internet

Veesites
Meet Virginia DeBolt eHow’s Internet Expert.