• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

4.5. Comments

Experienced Web authors are aware of how handy comments can be to Web code. When writing a Web page at the code-level, comments can be used to explain why certain actions or formatting decisions are made, or to mark distinct sections in code. For the same reasons, it is handy to be able to add comments to CSS code, so that you (or someone else) have an idea of what is going on in your code, and why.

In XHTML, comments are added to Web pages by using “<!--” at the beginning of the comment and “-->” at the end of the comment, as in the following code snippet:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint