字体颜色在网页设计中是最常见的功能之一,复杂的页面每个页面都会有多种字体颜色。html设置字体颜色的方式,有如下几种。
1、首先在桌面新建一个文件夹,然后新建两个text文件;分别将text文件重命名为index.html和css.css。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/bf096b63f6246b60527d5fe4f9f81a4c510fa22b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
2、用记事本打开index.html文件,输入以下代码。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/9213b07eca8065387299498385dda144ad34822b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
3、用浏览器打开浏览效果。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/7dd98d1001e93901b37160ae69ec54e736d1962b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
4、编辑index.html,在<p>标签内输入以下代码;<font color="#008252">字体颜色的不同设置方法</font>。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/bd3eb13533fa828b60507073ef1f4134970a5a2b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)
5、浏览器浏览效果,这样就完成了。
![](https://video.ask-data.xyz/img.php?b=https://iknow-pic.cdn.bcebos.com/4610b912c8fcc3ce23b324a38045d688d43f202b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto)