HTML font tags How to set the font weight, font style summary

Source: Internet
Author: User
This article mainly explains the font weight of the HTML font label settings, but also about the HTML font label style summary, I hope to help you, now let's look at this article together

First, let's talk about how the HTML font tag sets the font weight:

What we're talking about is a little bit of CSS style stuff, it's all about basics, let's take a look at the code example.

    • Font-weight Font Weight

font-weight:normal,bold,bolder,lighter,100-900;

Adding these to the CSS style will make it possible to set the font thickness to a range of 100 to 900. can be set.

Now let's look at the style summary for the font label:

CSS style properties related to the font tag:

    • Font-family Defining Fonts:

Font-family: "Microsoft Jas Black", "Arial";
    • Font-size Font Size:

Font-size:18px;font-size:150%;font-size:xx-small,x-small,small,medium,large,x-large,xx-large;font-size:smaller , larger;
    • Font-style font Style:

Font-style:normal,italic,oblique;
    • Font-variant make input not case-sensitive

Font-variant:normal,small-caps;
    • The last is the shorthand for the Font property:

Font:  bold italic 18px  Arial;

The font shorthand property sets all font properties in a declaration.

Note: This property also has a sixth value: "Line-height", which sets the line spacing.

Description of the HTML font tag:

This shorthand property is used to set two or more aspects of the element font at once. Using keywords such as icon, you can set the font of the element appropriately to match an aspect of the user's computer environment. Note that if you do not use these keywords, you must specify at least the font size and font family.

You can not set some of these values, such as font:100% Verdana; is also allowed. Properties that are not set use their default values.

About possible values for HTML font tags:

Okay, so this is the end of the article, and what's the problem you can ask below

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.