1.字体 font-family
<style>
h2{
/* 多个字体 */
font-family: 'Times New Roman', Times, serif;
}
p {
font-family: Microsoft YaHei;
}
</style>
<body>
<h2> 比利时(欧洲杯预选赛F组第2名</h2>
<p> 比利时(欧洲杯预选赛F组第2名)将于11月19日星期日下午17:00(格林威治标准时间)在博杜安国王体育场迎战阿塞拜疆(欧洲杯预选赛F组第4名)。</p>
</body>
2. 字体大小font-size
h2 {
font-size: 20px;
}
3. 字体粗细 font-weight
<style>
.bold {
font-weight: bold;
}
</style>
<body>
<h2> 比利时(欧洲杯预选赛F组第2名</h2>
<p> 比利时(欧洲杯预选赛F组第2名)</p>
<p class = "bold">将于11月19日星期日下午17:00(格林威治标准时间)</p>
<p>在博杜安国王体育场迎战阿塞拜疆(欧洲杯预选赛F组第4名)。</p>
</body>
![](https://i-blog.csdnimg.cn/blog_migrate/a7509ae65f5ccc214487fc9f14edc764.png)
4. 字体样式(如斜体)
<style>
p {
font-style: italic;
/* font-style: normal 倾斜的变成不倾斜 */
}
</style>
复合属性
p {
/* 复合属性 */
/* font: font-style font-weight font-size font-family; */
font: italic 700 16px 'Times New Roman'
}