Home > Web Front-end > Front-end Q&A > How to comment out css code

How to comment out css code

藏色散人
Release: 2023-01-31 10:56:41
Original
2700 people have browsed it

The way to comment out css code is to start with the "/*" symbol and end with the "*/" symbol; examples of css comment code are such as "/* This is a single line comment */p {color: red; }", you can also add comments anywhere in the code, comment code such as "p {color: red; /* Set the text to red*/}".

How to comment out css code

The operating environment of this tutorial: Windows 10 system, CSS3 version, DELL G3 computer

How to comment out the css code?

CSS Comments

Comments are used to explain the code and may be helpful later when you edit the source code.

Browsers will ignore comments.

CSS comments located within the