How to add comments in CSS - Example and code

Comments as in other programming languages ​​have two main purposes: document source code and disable CSS instructions.

How to add comments in CSS - Example and code | Learn CSS | Comments as in other programming languages ​​have two main purposes: document source code and disable CSS instructions

Large format instructions within a style sheet should always be commented on, so that they can be interpreted even over time. For this purpose, a special syntax is available, based on the programming language C.

Make use of it, especially when you want to define many different formats and subclasses. The comments will help modify the documents later.

/* Extra large title, in bold and red */

Comments are entered with / * and conclude with the same series of characters but reversed * /

Did you like it or was it useful?

Help us share it in Social Networks

Professor at the University of Guadalajara

Hugo Delgado Desarrollador y Diseñador Web en Puerto Vallarta

Professional in Web Development and SEO Positioning for more than 10 continuous years.
We have more than 200 certificates and recognitions in the Academic and Professional trajectory, including diploma certificates certified by Google.

IT ALSO DESERVES TO PAY TO VISIT:

Not finding what you need?

Use our internal search to discover more information
Sponsored content:
 

Leave your Comment

SPONSOR

Your business can also appear here. More information