comment out HTML


/ Published in: HTML
Save to your folder(s)

comment out HTML


Copy this code and paste it in your HTML
  1. <!-- ��� -->
  2. Usage Recommendation
  3. use it
  4.  
  5.  
  6. <!-- ��� --> allows you to insert comments into an HTML document and have them completely ignored by the browser. This is useful for such things as revision histories and notes about how to improve the document.
  7.  
  8. For example, this code
  9.  
  10.  
  11. <!-- Creation Date: June 21, 1996 -->
  12. <!-- Modifications: -->
  13. <!-- Sep 26, 1996: Added Links to Steve's Page -->
  14. <!-- Oct 10, 1996: Updated product list -->
  15. produces this (nothing):
  16.  
  17. <!-- ��� --> will even "comment out" other tags. Everything is commented out until the closing -->. However, commenting out code tends to result in sloppy code. The best use for <!-- ��� --> in this sense is for experimentation, to try out different code without deleting other attempts. But when the experimentation is done, take out the unused code.
  18.  
  19. For example:
  20.  
  21.  
  22. <!-- <IMG SRC="biguglypumpkin.gif" ALT="pumpkin"> -->
  23. <IMG SRC="pumpkin.gif" ALT="pumpkin">
  24. would be good for trying out different GIFs, but take out the commented part after you've decided on an image.
  25.  
  26. Comments may not have double hyphens (--) within them. This is because technically the comment ends with --, not -->. In practice virtually all browsers don't end the comment until -->.

URL: http://www.htmlcodetutorial.com/_33n45n45n.html

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.