<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" type="text/css" href="test2.css">
</head>
<body>
<p>今天是个好日子</p>
<b class="test1">今天是个好日子</b>
<d id="test2">今天是个好日子</d>
<marquee behavior=alternate>需要移动的文字</marquee>
</body>
</html>
p{
color:fuchsia;
}
.test1{
color: blueviolet;
}
#test2{
color: aquamarine;
}
- 制作自己的导航条。
- HTML头部元素:
- <base> 定义了页面链接标签的默认链接地址
- <style> 定义了HTML文档的样式
- <link> 定义了一个文档和外部资源之间的关系
- 练习样式表:
- 行内样式表
- 内嵌样式表
- 外部样式表
- 分别练习定义三类选择器:
- HTML 选择器
- CLASS 类选择器
- ID 选择器