Home > Web Front-end > HTML Tutorial > How to set the font color of html and how to use ps to get the accurate font color of html_HTML/Xhtml_Web page production

How to set the font color of html and how to use ps to get the accurate font color of html_HTML/Xhtml_Web page production

WBOY
Release: 2016-05-16 16:38:04
Original
2947 people have browsed it

1. HTML font color setting

In HTML, we use the font tag to set the color of the font content.

1. Font syntax:


Copy code
The code is as follows:

< ;!DOCTYPE html>



font font color online example</ p>


I am a red font
< table width="300" border="1">

Hello






First of all, font is a pair of regular tags. Put the font text content into the tag. Set the color color corresponding to the color value in the font tag to set the font color in the font tag object.

2. Example of setting font color in html font

2-1. Complete code of html font color example:


Copy code
The code is as follows:





css implementation Font color online demonstration</p>




my font It’s red

My font is blue


2-2. Screenshot of font color example

Screenshot of HTML font color setting case

2-3. Online demonstration: View case

To change the font color, just change the color value.

2. HTML p css font color setting

Set font color through css style in html.

There are two ways to set html font color using css, one is CSS within the tag and the other is external CSS. 1. Introduction to basic knowledge

To use external CSS, you can put the CSS code separately into the CSS file and use html link to introduce CSS (html introduces css), or you can use the


< ;p> For the test content, I uniformly set the color bluecSS


I am inside a div object, and the hyperlink color is I am a hyperlink green




Use the