在 HTML 文档中使用 class 属性
https://www.w3school.com.cn/tags/att_standard_class.asp
<html> <head> <style type="text/css"> h1.intro {color:blue;} p.important {color:green;} </style> </head> <body> <h1 class="intro">Header 1</h1> <p>A paragraph.</p> <p class="important">Note that this is an important paragraph.</p> </body> </html>