📅  最后修改于: 2020-11-02 03:36:16             🧑  作者: Mango
颜色是标签的属性,用于指定文本颜色。
我们可以使用以下不同的属性值指定文本颜色:
例:
例:
示例:以下示例使用不同的color属性值:
示例1:以下示例使用颜色的名称:
Example of color attribute
javaTpoint
输出:
示例2:以下示例使用十六进制代码定义文本颜色:
Example of color attribute
javaTpoint
输出:
示例3:以下示例使用rgb数字定义文本颜色:
Example of color attribute
javaTpoint
输出:
示例4:下面的示例使用字体颜色的所有属性值。
Example of color attribute
The color attribute of font tag sets the color 'maroon' for the following paragraph by using the RGB Number "rgb(0,1,0)"
HTML is an acronym which stands for Hyper Text Markup Language which is used for creating web pages and web applications. Let's see what is meant by Hypertext Markup Language, and Web page.
The color attribute of font tag sets the color 'orange' for the following paragraph by using the name of colour
HTML is an acronym which stands for Hyper Text Markup Language which is used for creating web pages and web applications. Let's see what is meant by Hypertext Markup Language, and Web page.
The color attribute of font tag sets the color 'magenta' for the following paragraph by busing the Hex code "#ff00ff"
HTML is an acronym which stands for Hyper Text Markup Language which is used for creating web pages and web applications. Let's see what is meant by Hypertext Markup Language, and Web page.
输出:
Element | Chrome | IE | Firefox | Opera | Safari |
Yes | Yes | Yes | Yes | Yes |