如何对段落重新着色



我试图用红色写这段话,但我没有得到预期的结果,有人能帮我吗?

<h1> OluwaTomyin Giwa is an awesome guy. </h1>
<br>
<p color="red" no shade>  OluwaTomiyin was born in Nigeria in the year 1984, to the parents of John and Olufunto Giwa. </p>

使用样式。

<h1> OluwaTomyin Giwa is an awesome guy. </h1>
<br>
<p style="color:red;" no shade>  OluwaTomiyin was born in Nigeria in the year 1984, to the parents of John and Olufunto Giwa. </p>

您应该将其写成

<p> <span style="color:red;"> Your Text</span</p>

<p>标记没有color属性使用内联CSS这样做…

<h1> OluwaTomyin Giwa is an awesome guy. </h1>
<br>
<p style="color:red;" no shade>  OluwaTomiyin was born in Nigeria in the year 1984, to the parents of John and Olufunto Giwa. </p>

或者你可以使用内部CSS

<html>
<head>
<style> 
.red {
color:red;
} 
</style>
</head>
<body>
<h1> OluwaTomyin Giwa is an awesome guy. </h1>
<br>
<p class="red" no shade>  OluwaTomiyin was born in Nigeria in the year 1984, to the parents of John and Olufunto Giwa. </p>
</body>
</html>

最新更新