英文翻译:
!DOCTYPE html:文档类型html
html:超文本标记
head:头部
meta:元信息
charset:字符集
title:标题
body:文档主体
color:颜色
font-size:字体尺寸
演示代码:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<style type="text/css">
/* 下面选择很繁琐 */
/* div{
color: red;
}
p{
color: red;
} */
div,p{
color: red;
}
div,#three{
font-size: 30px;
}
header #one,.two,#three{
font-weight: 600;
}
</style>
</head>
<body>
<!-- 并集选择器: -->
<!-- 1,同时选中多个元素 -->
<!-- 2,选择时用“,”隔开 -->
<header><div id="one">我要自学1</div></header>
<p class="two">我要自学2</p>
<p id="three">我要自学3</p>
</body>
</html>