coding180 icon
Coding180
CSS Comments

CSS Comments

Home > Tutorials > CSS > CSS Introduction


Just like comments in HTML, there are comment statements in CSS: /*comment statement*/ used to indicate (used in HTML <!--comment statement-->). Like the following code:

/* This is a comment */
p{
font-size: 12px;
color:red;
}

 

Task 2
Add comment statements to CSS style code to indicate the function of the code

1. Add " "  comment 9 after the font-size: 12px; statement in line 1 of the editor on the right. Set the text font size to 12px.

2. In the editor on the right, add a " " comment 10after the statement color: red; set the text color to red.

Task code:

<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>CSS comment code</title>
    <style type="text/css">
    p {
        font-size: 12px;
        color: red;
    }
    </style>
</head>

<body>
    <p>coding180.com, a super cool Internet and IT technology free learning platform.</p>
</body>

</html>

 


user

Robort Gabriel

Lagos, Nigeria

Freelance Web Developer, Native Android Developer, and Coding Tutor.

Skills
  • UI / UX
  • JavaScript
  • Python
  • PHP
  • Kotlin
  • Java
  • Bootrap
  • Android
  • Laravel