一,效果图。
二,代码。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CSS 语法</title>
<style>
p {
color: red;
text-align: center;
}
</style>
</head>
<body>
<p>Hello world!</p>
<p>this paragraph is styled with css</p>
</body>
</html>
参考资料:《菜鸟教程》