Zero-based CSS Introductory Tutorial (18) - Notes

1. Mission objectives

We learned about html comments before, not only html has comments but css also has comments. Notes are very common in our English and classical Chinese.

2. CSS comments

code show as below

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
      
      
           /* 设置背景颜色和字体颜色 */
            background-color: blue;
            color: chartreuse;
        }
    </style>
</head>

<body>
    <div class="box">
        君不见黄河之水天上来
        奔流到海不复回
    </div>

</body>

</html>

The effect is as follows
insert image description here

3. Summary

We can see that adding comments in the code cannot be displayed on the web page. We must learn to use comments and develop the habit of using comments.

Guess you like

Origin blog.csdn.net/weixin_61808806/article/details/128250921