Home > Web Front-end > HTML Tutorial > How to set the font thickness of html font tag, summary of font style of font tag

How to set the font thickness of html font tag, summary of font style of font tag

寻∝梦
Release: 2018-09-01 11:08:15
Original
25159 people have browsed it

This article mainly explains to you the setting of the font thickness of the HTML font tag, as well as the style summary of the HTML font tag. I hope it will be helpful to you. Let us read this article together now.

First of all, let’s talk about how to set the font thickness of the HTML font tag:

What we are talking about now is a bit related to the CSS style. These are some basic things, let’s take a look at the code example

  • font-weight font weight

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

Add in css style By doing this, you can successfully set the weight of the font, ranging from 100 to 900. All can be set.

Now let’s take a look at the style summary of the font tag:

##CSS style attributes related to the font tag:

  • font-family Define font:

  • font-family:"微软雅黑","arial";
    Copy after login
  • 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;
    Copy after login
  • font-style Font style:

  • font-style:normal,italic,oblique;
    Copy after login
  • font-variant Makes input case-independent

  • font-variant: normal,small-caps;
    Copy after login
  • Finally, the shorthand for the font attribute:

  • font:  bold italic 18px  arial ;
    Copy after login
    font The shorthand attribute sets all font properties in one statement.

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

    Note on the HTML font tag:

    This shorthand attribute is used to set two or more aspects of an element's font at once. Use keywords such as icon to appropriately set the font of an element to match an aspect of the user's computer environment. Note that if these keywords are not used, at least the font size and font family must be specified.

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

    How to set the font thickness of html font tag, summary of font style of font tag

    About the possible values ​​​​of the html font tag:

    How to set the font thickness of html font tag, summary of font style of font tag

    Okay, this article It’s over here. If you have any questions, you can ask them below

    [Editor’s recommendation]

    What does the HTML5 meter tag mean? Detailed explanation of the usage of meter tag

    #html How to select the select tag by default? Introduction to the use of select tag

    The above is the detailed content of How to set the font thickness of html font tag, summary of font style of font tag. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template