1_我的第一个css程序

index代码

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <!--规范, <style>可以编写css的代码,每一个声明最好使用分号结尾
    语法:
        选择器{
            声明1;
            声明2;
            声明3;
        }
    -->
    <link rel="stylesheet" href="style.css">
</head>
<body>

<h1>我是标题</h1>

</body>
</html>

css代码

h1{
    color: red;
}

结果展示

 

posted @ 2022-08-05 18:03  tuyin  阅读(52)  评论(0)    收藏  举报