How to add css comments

How do you comment on CSS?

A CSS is used to block the browser to add explanatory notes to the comment code or to explain part of the style sheet. Some of the tags that you need to take the help of CSS comments are / * comment here * / You can easily make a CSS comment with these tags.

How do you write a good comment in CSS?

If we want to create a lot of code inside your website. It can be kind of hard to know what’s inside if you don’t make short comments for yourself. Body tegs There’s an h2 tag that you guys can see and I now have a paragraph tag. I can do whatever I want or create a comment inside the HTML. I can go ahead and go as far as by h2 teg and I can say less than amazement – and now friends can see everything hereafter the comment tag has turned grey and that is why the comment teg here below is a comment. All I can do is go out and say we want to make a comment that says.

 /* This is a CSS comment! */
 /* Remember that you have to add the end bit on comments orall your code will turn to comments! Thease comments can go overseveral lines! */ 
/* p { color: white; background-color: #2594A4; } */

HTML and CSS comments

From the HTML tutorial, you learned that you can add comments to your HTML source using the <! –…–> syntax.

<!DOCTYPE html> 
      <style> p { color: red; /* Set text color to red */ } </style>
      <h2>My Heading</h2>
      <!-- These paragraphs will be red --> 
      <p>Hello World!</p>
      <p>This paragraph is styled with CSS.</p>
      <p>CSS comments are not shown in the output.</p>

Do you need CSS comments?

CSS comments are not poison for a website. It is used to give an idea about the code of the developer or the design, which means 99% CSS comment is used. If you want, you can check the Facebook wheel. They have also used comments

This Post Has 4 Comments

Leave a Reply

Your email address will not be published.

Education Template