Change HTML font color to black: Use text color hex code #000000. Use the CSS color name black.
How to change HTML font color to black
To change HTML font color to black you can use text Color hex code #000000
or CSS color name black
.
Here's how to use both methods:
Hex Code
In your HTML code, use the following syntax:
<p style="color: #000000;">This text is black.</p>
CSS Color Name
In your CSS code, use the following syntax:
p { color: black; }
Example
The following is an HTML example where the text in a paragraph has been set to black:
<head> <style> p { color: black; } </style> </head> <body> <p>This text is black.</p> </body>
Note
The above is the detailed content of How does the html font color change to black?. For more information, please follow other related articles on the PHP Chinese website!