How to Make a Comment in a CSS File

How to Make a Comment in a CSS File thumbnail
Use comments to document code with non-displaying text.

Cascading Style sheets, or CSS, files contain layout and format definitions for HTML Web pages. CSS comments help you indicate the purpose and operation of a style sheet as well as each individual style definition. Several comment formats are acceptable in different browser types, so it is important to use one that all Web browsers recognize.

Instructions

    • 1

      Open your CSS file using an HTML or text editor.

    • 2

      Type your comment in the following format:

      /* This is a one line comment */
      /* This is a multiline comment
      that the browser will not display */

    • 3

      Press “Ctrl+S” to save the CSS file.

Related Searches:

Resources

  • Photo Credit Comstock/Comstock/Getty Images

Comments

Related Ads

Featured