You may always think of writing comments in CSS. Write CSS comments and comment out CSS codes. Add commented descriptions to explain CSS line of codes. Prefer adding comments in CSS codes to manage them in a better way.

What are Comments in CSS?

CSS comments are the line of texts or codes which are not visible in the frontend to the users. These are the best way of coding to add the explanation of codes in each line of CSS. Add the purpose of each line of CSS codes to make it easily manageable in future.

If the new user wants to change the piece of CSS codes. It may difficult to change or add CSS codes if they have no explanation of purpose. CSS comments makes it easy for the coders to easily understand each line of code in just one view.

How to Write CSS Comments

To write CSS comments, you have to add the comment CSS codes or texts inside the start symbol /* and the end symbol */. You can add CSS codes or the text you want to make commented using the above symbol.

This is the single line commented CSS text or code. However, you also add the multiline CSS comments using the same symbol. Multiline comments in CSS is useful to comment out multiple lines in CSS.

To add multiline CSS comment, you can have to put the CSS codes or texts inside the starting tag /* and end tag */. You can add as many codes of CSS inside the comment symbols as you want.

You may also like.

Hope, you like this tutorial. If you have any query regarding the CSS comment system. You can comment below to get the solution.

Reference

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.