我的问题是关于为段落中的文本添加颜色。我想添加白色。我尝试在段落开头添加标签,但它不起作用。我该怎么做?
如果你想给html parahraph着色,你需要CSS。
您可以内联执行此操作:<p style="color:white">Lorem ipsum</p>
或者在 <head>
元素内的样式标记之间:
<style> p { color: white; } </style>
或者在单独的 CSS 文件中:
p { color: white; }
在这种情况下,您需要在 html 中引用 CSS 文件,如下所示:
<link rel="stylesheet" type="text/css" href="theme.css">