Home > Web Front-end > HTML Tutorial > What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table)

What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table)

寻∝梦
Release: 2018-08-22 13:59:22
Original
52463 people have browsed it

What is the color attribute of the HTML font tag? Introduction to the usage of the color attribute in font (with color code table). This article only introduces some usage of the color attribute of the HTML font tag, as well as details about the color code table of HTML.

The color attribute of the HTML tag

Specifies the color of the text:

<font color="red">This is some text!</font>
Copy after login

The color attribute of the HTML tag Definition and usage: The

color attribute specifies the color of the text in the font element.

##html color syntax:

www.divcss5.com

The tag directly uses the color color parameter to set the text color. The value can be directly added to the RGB color value (#FFFFFF, #000000, #F00)

The RGB color value is determined during the actual layout, and you can use Photoshop ( PS for short) pick up the tool to get it.

Use the color color setting in the font tag:

www.divcss5.com red

html color summary:

1. We use color to set the color value in the font tag.

2. Generally, you can only use "color=color value" directly in the font tag to set the text color of the object text.

Browser support

All major browsers support the color attribute.

Compatibility Notes

In HTML 4.01, the color attribute of the font element is deprecated; in the XHTML 1.0 Strict DTD, the color attribute of the font element is not supported.

Please use CSS instead.

CSS syntax:

html The color attribute attribute value of the font tag:

color_name: Specifies the text color whose color value is the color name (such as "red")

hex_number: Specifies the text color whose color value is the hexadecimal value (such as: "#ff0000")

rgb_number : Specifies the text color whose color value is rgb code (such as "rgb(255,0,0)").

Specifies the text font, size and color:

<font size="3" color="red">
This is some text!
</font>
<font size="2" color="blue">
This is some text!
</font>
<font face="verdana" color="green">
This is some text!
</font>
Copy after login

ace defines the appearance of the font , size defines the size of the font, color defines the color of the font

<h1><font face="verdana">A heading</font></h1>
<p><font size="5" face="arial" color="red">A paragraph.</font></p>
Copy after login

-

tag can define the title,

defines the largest title,

defines the smallest title .

Because the h element has exact semantics, please carefully choose the appropriate tag level to structure the document. Therefore, please do not use title tags to change the font size within the same line.

Instead, we should use cascading style sheet definitions to achieve beautiful display effects.

Mark a paragraph:

<p><font face="宋体",size="5",color="blue">this is a paragraph</font></p>
Copy after login
font is the basic attribute color and belongs to the inner label.

is a paragraph and requires line breaks.

HTML color code:

What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table)

The picture shows the HTML color code table for black, red and purple

What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table)

The picture shows the green, blue and green HTML color code table

What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table)

The picture shows the green, yellow and orange HTML color code table

What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table)

The picture shows the HTML color code table of dark red, brown, and dark purple

This article ends here. If you are interested in this article about the color attribute of the html font tag If you have any questions, please ask below.

【Related recommendations】

html5 What does the output tag mean? How to use the html5 output tag

#What is the html font tag? Detailed introduction to the attributes of the tag

The above is the detailed content of What is the color attribute of HTML font tag? Introduction to the usage of fontcolor (with color code table). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Previous article:What is html table? How to use various attributes in the tag Next article:What does the html small tag mean? Examples of how to use the small tag
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template