1. CSS intro
  2. CSS stylesheets
  3. CSS syntax
  4. CSS Classes & ID's
  5. CSS comments
  6. CSS BG properties
  7. CSS text properties
  8. CSS font properties
  9. CSS list properties
  10. CSS border properties
  11. CSS margin properties
  12. CSS padding properties
  13. CSS outline properties
  14. CSS table properties
  15. CSS dim properties
  16. CSS class properties
  17. CSS position properties
  18. CSS pseudo classes
  19. CSS pseudo elements
  20. CSS shortcuts
  21. CSS media types
  22. CSS summary

CSS comments

Comments are declared within stylesheet definitions so that code would be easier to understand and navigate. Comments in CSS are ignored by web browsers.

This tutorial focuses on:

Including comments in stylesheet definitions

Comments begin with /* and end with */ and can span as many lines as you want.

<html> <head> <style type="text/css"> /* this is a comment this is another comment */ p{ color: green; /* the color of the text in the paragraph */ font-family: Courier; margin-top: 0; margin-left: 0; /* the left margin of the paragraph */ } </style> </head> <body> <p> The text in this paragraph will be green. </p> </body> </html>
© Copyright 2013-2014 Landofcode.com
Terms of use | Privacy policy | Copyright information