3.1HTML5样式的使用

 1.标签:
<style>:样式定义
<link>:资源引用


2.属性
rel="stylesheet":外部样式表
type="text/css":引入文档的类型
margin-left:边距

3.三种样式表插入方法

  • 外部样式表:
<link rel="stylesheet" type="text/css" href="mystyle.css">


css文件的书写 h1{color:red;}

  • 内部样式表:
<style type="text/css">
body{background-color:red}
p{margin-left:20px}
</style>

  

  • 内联样式表:
<p style="color:red">

  

原文地址:https://www.cnblogs.com/moluo/p/6361098.html