CSS – Comments

The comments in CSS are used to describe the code and are ignored by the web browsers i.e. whatever you mention in the comments won’t be displayed.

To add comments, use:

The following are the type of comments in CSS:

  • Single-line comments
  • Multi-line comments

Single-line comments in CSS

Allows you to set single-line comments as in the below example:

When we will run and get the output, the comments won’t be visible on the web page:

CSS Comments

Multi-line comments

To span comments on multiple lines at a time, use the multi-line comments in CSS. Let us see the above example and set multi-line comments which won’t be visible on the web browser:

When we will run and get the output, the multi-line comments won’t be visible on the web page:

CSS comments

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others.


Read More:

CSS Lists
CSS - Margins
Studyopedia Editorial Staff
contact@studyopedia.com

We work to create programming tutorials for all.

No Comments

Post A Comment

Discover more from Studyopedia

Subscribe now to keep reading and get access to the full archive.

Continue reading