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

Commenting your code

Each type of coding has its own language style or syntax (it's like grammar for computers). You must use proper syntax when creating any code. If you don't, the code won't work — or it might do unexpected things. Even comments have proper markup and/or syntax. If you don't create code comments correctly, the browser may see it as content or code and treat it as such instead of keeping it hidden the way it should. (See Book III, Chapter 2 for information about using comments in general.) In CSS, comments look like this:

/*Banner and header styles ‐ creates background color and places images*/
#banner(width: 100%; background‐color: #000;}
#banner p{color: #fff;}
#header{border‐bottom: 1px #333 solid;}
/*End banner and header styles*/


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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