CSS - Comments

CSS Comments

CSS comments are words, phrases, sentences that are used to explain or give brief description of what a style code does.

  • It starts with /* and ends with */
  • CSS comments are of two types: Single and Multiple lines comment.

Disable Style

Comments in CSS can also be used to disable style. Reasons can be: for later usage or other special purposes.

  • Wrap the style with the opening comment tag /* and closing comment tag */
  • You can also wrap multiple style if you wish.
note
NOTE:

/* This is the correct comment */
/ * This is an incorrect comment */
/ * This is an invalid comment * /

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT