环境Windows 工具vscode
- 标签
<style>
:样式定义<link>
:资源应用,比如可以应用css
- 属性
- rel = “”:link标签的一个可选项,规定当前文件和被链接的url(使用href=""指定)之间的关系
- type = “”:引入文档的类型
- margin-left/right:控制边距
样式表插入方法
- 外部样式表:
<link rel = "stylesheet" type = "text/css" href = "xxx.css">
- 内部样式表:
<style type = "text/css"> body {background-color:blue} p {margin-left:20px} </style>
- 内联样式表:
<p style="color:blue">
<!DOCTYPE html>
<html lang="en">
<head>
<title>样式</title>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="style.css">
<style type="text/css">
p{color: aqua;}
</style>
</head>
<body>
<h1>h1</h1>
<p>hello world</p>
<a href="https://blog.csdn.net/Mrchuncui" style="color: coral;">我的博客</a>
</body>
</html>