How to set PHP font color:
The font color is ultimately controlled by HTML element attributes or CSS styles, and PHP is output at most.
Related recommendations: "PHP Getting Started Tutorial"
HMTL Element Attributes
<font color="#FF0000">红色</font>
or
<font color="red">红色</font>
CSS style
<style type="text/css"> .red_css {color:#FF0000;} #red_id_css {color:#FF0000;} </style> <font class="red_css">红色</font> <font id="red_id_css">红色</font>
Or directly use the style of the element to set
<font style="color:#FF0000;">红色</font>
PHP output:
echo '<font style="color:#FF0000;">红色</font>';
The above is the detailed content of How to set php font color. For more information, please follow other related articles on the PHP Chinese website!