How to Insert a Comment Into the HTML of a Web Page

Use HTML comments to make design notes, specify where sections begin or note special codes such as JavaScript. You'll need a basic knowledge of HTML (see "How to Learn HTML" under the Related eHows) and an existing Web page.

Things You'll Need

  • Modems
  • Internet Access
  • Microsoft Notepad
  • Web Browsers
Show More

Instructions

    • 1

      Start a text editing program, such as WordPad or EditPad. Locate the Web page and open it.

    • 2

      Position the cursor where the comment will appear, after the tag.

    • 3

      Begin the tag by typing the following:

    • 6

      Save the page when finished and preview it in a browser.

Tips & Warnings

  • Comments must be located in the body of the Web page, after the tag. Otherwise, the page may not display properly.

  • Comments are invisible to Web page viewers. If you see the comments when previewing the page, check for both opening and closing tags and two dashes with spaces separating the dashes from the comment text.

  • Comments are still visible in the source code of the page, so do not add information you don't want people to see, such as passwords or sensitive material.

Related Searches:

Comments

You May Also Like

Related Ads

Featured