Table of Contents
A heading" >A heading
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)

Aug 22, 2018 pm 01:59 PM
color font html

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 id="font-nbsp-face-verdana-A-nbsp-heading-font"><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!

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Table Border in HTML Table Border in HTML Sep 04, 2024 pm 04:49 PM

Guide to Table Border in HTML. Here we discuss multiple ways for defining table-border with examples of the Table Border in HTML.

Nested Table in HTML Nested Table in HTML Sep 04, 2024 pm 04:49 PM

This is a guide to Nested Table in HTML. Here we discuss how to create a table within the table along with the respective examples.

HTML margin-left HTML margin-left Sep 04, 2024 pm 04:48 PM

Guide to HTML margin-left. Here we discuss a brief overview on HTML margin-left and its Examples along with its Code Implementation.

HTML Table Layout HTML Table Layout Sep 04, 2024 pm 04:54 PM

Guide to HTML Table Layout. Here we discuss the Values of HTML Table Layout along with the examples and outputs n detail.

HTML Input Placeholder HTML Input Placeholder Sep 04, 2024 pm 04:54 PM

Guide to HTML Input Placeholder. Here we discuss the Examples of HTML Input Placeholder along with the codes and outputs.

HTML Ordered List HTML Ordered List Sep 04, 2024 pm 04:43 PM

Guide to the HTML Ordered List. Here we also discuss introduction of HTML Ordered list and types along with their example respectively

Moving Text in HTML Moving Text in HTML Sep 04, 2024 pm 04:45 PM

Guide to Moving Text in HTML. Here we discuss an introduction, how marquee tag work with syntax and examples to implement.

HTML onclick Button HTML onclick Button Sep 04, 2024 pm 04:49 PM

Guide to HTML onclick Button. Here we discuss their introduction, working, examples and onclick Event in various events respectively.

See all articles