How does the HTML font label set the font size? HTML Font Tag Property usage Introduction

Source: Internet
Author: User
This article mainly introduces how to set the font size of the HTML font tag, this is actually similar to CSS, but the other two font tag properties can not be used, with CSS instead, but we should introduce the introduction, lest someone forget, introduced the HTML The three attributes of the font label. Let's take a look at this article.

First, let's take a look at how the HTML font tag sets the font size:

All only to the HTML font tag is a special to set the font of the label, although in the HTML5 is very few (because all use CSS style to set the font tag inside the property), but personally think that the font tag is still quite powerful label, why so say, look down to know.

Let's first look at a code example:

<body>    <p> Here is <font size= ">topic.alibabacloud.com</font>"; Welcome to Topic.alibabacloud.com, which has a very comprehensive programming course </p></body>

In order to show it more clearly, we have now made such a big word so that we can see it more clearly. Effects displayed in the browser

You can see, I put the font label inside of such a big change, it should be very clear and intuitive.

Now we're done explaining the first question, font resizing. (Want to see more courses on HTML programming, Welcome to topic.alibabacloud.com)

Now let's take a look at the use of HTML font tag properties:

Just introduced an HTML font tag that can change the font size of the property.

Now let's introduce the properties of the two HTML font tags.

    • The font face property, which is a property that can define fonts;

    • The font color property, which is a property that defines the font color

Let's take a look at hit:

first of all, the font face property, as long as it is on your computer has a style, can be used in this display.

For example, take a look at the code example:

<body>    <p> Here is <font size= ">topic.alibabacloud.com</font>", Welcome to <font face: "Blackbody" >topic.alibabacloud.com</font>, there is a very comprehensive programming course </p></body>

This code does not show the picture, directly look at the code bar, the above added a font family, which wrote a black body, indicating that the line of text directly into the text style directly into the bold display, because it does not show what effect, so there is no picture to see.

We know the line, if we do not test, you can add CSS style, CSS style font inside the set font-family: "Bold" on the line, is also very simple.

now say the second font color property , a property that defines the color of the font. The usual, or look at the code example:

<body>    <p> Here is <font size= ">topic.alibabacloud.com</font>", Welcome to <font face= "Blackbody" >topic.alibabacloud.com</font>, there is a very comprehensive <font color= "red" > Programming Course </font></p></body>

This adds a font label to the final programming lesson, and the color becomes red. This effect is also obvious, let's show it in the browser:

, this is very obvious, this is to make the font red, in fact, the black body can also be seen, although not very obvious, but I still circle out, we look at the line.

This HTML font tag is now used less and more, basically CSS people like to use CSS style to define the style of the font, such as changing the color, but I may be a nostalgic complex bar, as long as can be displayed, I use the font tag attributes. Do not use CSS properties.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.