"; 2. Set the font color through "" ."/> "; 2. Set the font color through "" .">

Home >Web Front-end >Front-end Q&A >How to set font color size in css

How to set font color size in css

藏色散人
藏色散人Original
2021-05-14 10:17:252630browse

How to set the font color size in css: 1. Set the font size through "<font size="12px"></font>"; 2. Through "" Set the font color.

How to set font color size in css

The operating environment of this article: Windows7 system, HTML5&&CSS3 version, Dell G3 computer.

<font size="12px"></font> The font size here is set to 12 pixels. You can also set other sizes. Note that the unit can be pixels or other sizes. For example, centimeters and inches can be used. The hexadecimal value is such as #873422

## The font is bold (you can also use <b></b> , not recommended)

Underline

---------------------- ----------------------------------

< ;/h1>

I will explain this code to you separately

First of all,

is the [title tag]. In addition to h1, there are also h2, h3, h4, h5, h6, and the font size is reduced in sequence. Small, this is mainly used based on actual conditions. [But it is not used to control font size].

align="center" is the attribute and center is the value. That is to say, the h1 title is displayed in the middle of the web page, and left and right are used to display the title on the left or right. .

ps:

Now used to control the appearance and performance of web pages are controlled by css, that is, style sheets. For example, if we write a title like this

html text style----for entry-level students

. Using the above writing method, it is

html text style


---- Written for entry-level students

, [
means line break]

This code is to display the second subtitle h2 in the main title of the play and to display it on the right side of the webpage in the next line

------This is not the case when using css.

Direct content

HTML text style


--- -Write to entry-level students

Then write styles h1{text-align="center";},h2{text-align="right";}Of course, this css code to control the style To be written in the style tag

Recommended study: "

css video tutorial

"

The above is the detailed content of How to set font color size in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:How to add borders in cssNext article:How to add borders in css