Indiana University
University Information Technology Services
  
What are archived documents?
Login>>
Login

Login is for authorized groups (e.g., UITS, OVPIT, and TCC) that need access to specialized Knowledge Base documents. Otherwise, simply use the Knowledge Base without logging in.

Close

In HTML, how do I include a comment?

To incorporate comments (i.e., text that is not to be interpreted or displayed by the web browser) into your HTML source code, use the following format:

<!-- This sentence will not be displayed by the browser. -->

In an HTML comment, everything between the <!-- and -->, including line breaks, is ignored by the web browser. Here is a sample of commented HTML code:

<!-- This list of addresses was last revised 3/5/05 --> <UL> <!-- Bob's address may change soon --> <LI><STRONG>Bob:</STRONG> 1234 Generic Drive, Erehwon, IN. <!-- This is Jane's new address --> <LI><STRONG>Jane:</STRONG> 4321 Cireneg Avenue, Nowhere, MN. <!-- Joe's not going to be moving for a long time! --> <LI><STRONG>Joe:</STRONG> C/O Inmate 123456, Eslerehwyna Federal Penitentiary, Eslerehwyna, NY. </UL>

The browser will interpret and display this as follows:

  • Bob: 1234 Generic Drive, Erehwon, IN.
  • Jane: 4321 Cireneg Avenue, Nowhere, MN.
  • Joe: C/O Inmate 123456, Eslerehwyna Federal Penitentiary, Eslerehwyna, NY.

Note: You may not use the -- construct inside an HTML comment. Also, some browsers interpret  >  within a comment as the end of the comment. Therefore, if you comment out HTML tags, some browsers may not display your page correctly.

This is document aewt in domain all.
Last modified on September 28, 2007.

Comments/Questions/Corrections

Use this form to offer suggestions, corrections, and additions to the Knowledge Base. We welcome your input!

If you are affiliated with Indiana University and would like assistance with a specific computing problem, please use the Ask a Consultant form, or contact your campus Support Center.

Contact Information

Note: We will reply to your comment at this address. If your message concerns a problem receiving email, please enter an alternate email address.