Home>Article>Web Front-end> How to set font color in html
htmlHow to set font color: 1. Set through external CSS style; 2. Set through internal CSS style; 3. Set through font tag.
The operating environment of this tutorial: windows7 system, html5 version, DELL G3 computer.
htmlHow to set font color:
1. Set through external CSS style. You can add style to the head tag, and add class="the name defined in the above style, such as blue" to other tags in the body, such as h1, p, div and other start tags. The code is implemented as follows:
#2. Set through internal CSS styles. In other tags in the body, such as h1, p, div and other start tags, just add style="color:white;font-size:25px;". The code is implemented as follows:
#3. Set through the font tag. In the content of other tags in the body, add the font tag to set the font color and size, such as color="yellow" size="5". It should be noted that the maximum value of size is 7, and the font color and size are assigned using the equal sign. The first two CSS styles are assigned using English colons. The code is implemented as follows:
Related learning recommendations:html video tutorial
The above is the detailed content of How to set font color in html. For more information, please follow other related articles on the PHP Chinese website!