样式表的嵌入形式
方式一
行内样式:直接在相应的标签中加入
<h1 style="color: red;">焦点访谈:中国底气 新思想夯实大国粮仓</h1>
方式二
内嵌样式:在head中加入style进行设置
<style>h1 {/* color: red; *//* color: rgb(0, 0, 255); */color: #4D4F53;}</style>
方式三
外嵌样式:在head中加入link进行设置
<link rel="stylesheet" href="css/news.css">
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>焦点访谈:中国底气 新思想夯实大国粮仓</title><!-- 方式二: 内嵌样式 --><style>h1 {/* color: red; *//* color: rgb(0, 0, 255); */color: #4D4F53;}</style><!-- 方式三: 外联样式 --><!-- <link rel="stylesheet" href="css/news.css"> -->
</head>
<body><img src="img/news_logo.png"> 新浪政务 > 正文<!-- 方式一: 行内样式 --><!-- <h1 style="color: red;">焦点访谈:中国底气 新思想夯实大国粮仓</h1> --><h1>焦点访谈:中国底气 新思想夯实大国粮仓</h1><hr>2023年03月02日 21:50 央视网<hr></body>
</html>