🎪CSS的三种引入方式
1 <p style="color: red;"> 2 内联式:直接在p标签里设置
1 <head> 2 <title></title> 3 <style type="text/css"> 4 h3{ 5 color:green; 6 } 7 </style>
三、外部式:创建一个CSS文件设置代码,head 里面使用 link 标签
1 h4{ 2 color: blue; 3 font-size: 20px; 4 }
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title></title> 5 <style type="text/css"> 6 h3{ 7 color:green; 8 } 9 </style> 10 <!-- 填写外部CSS代码链接路径 --> 11 <link rel="stylesheet" type="text/css" href="CSS外部代码\03 CSS的三种引入方式外部代码.css"> 12 </head> 13 <body> 14 <p style="color: red;"> 15 内联式:直接在p标签里设置 16 </p> 17 <h3>嵌入式:在hand里面使用style 标签</h3> 18 <h4>外部式:创建一个CSS文件设置代码,hand里面需要使用link标签</h4> 19 </body> 20 </html> 21 <!-- 推荐使用外部引入方式 -->