What is the font tag in html? how to use? This article will introduce to you what the tag is, and let you understand the usage of the font tag. There is a certain reference value, friends in need can refer to it, I hope it will be helpful to you.
First of all, let’s understand what the tag is? What’s the use?
font (font), as the name implies, the tag is a tag that sets the text style, and can set the font style, font size, and font color of the text.
Let’s introduce the usage of tag in HTML through a simple code example!
This is a test text
Use italics to display text
Change the color of the font text
Change the font size
Effect picture:
/*Set italics*/ /*Set bold*/
2, color: Specifies the color of the text.
/*Legal color value: rgb(x,x,x), #xxxxxx (16 color system) , colorname (English name of the color)*/
Example:
/*Set the text color is white */ /*Set the text color to white*/ /*Set the color of the text to white*/
3. size: Specifies the size of the text.
/*number: A number from 1 to 7, the default value of the browser is 3. */
Example:
/*Set the size of the text to 5, Equivalent to a size of 24px*/
Next, let’s look at the browser’s support for the tag:
It can be seen that all major browsers support the tag.
Summary: The above is what is the tag introduced in this article? The whole content of the label usage, you can try it yourself to deepen your understanding, and hope it will be helpful to your study.
【Recommendation for more related tutorials】:
HTML Video Tutorial
Html5 Video Tutorial
bootstrap Video Tutorial
The above is What is the font tag in html? how to use? For more details (code explanation), please pay attention to other related articles on 1024programmer.com!