Home > Web Front-end > CSS Tutorial > How to use css font attribute

How to use css font attribute

silencement
Release: 2019-05-27 10:42:07
Original
2257 people have browsed it

How to use css font attribute

##Specify the font of the paragraph:

p
{
font-family:"Times New Roman",Georgia,Serif;
  }
Copy after login

Attribute definition and usage instructions
##font - The family attribute specifies the font of an element.

font-family can save multiple font names as a "fallback" system. If the browser doesn't support the first font, it will try the next one.

There are two types of font family names:

family-name - specified family name: the name of the specific font, such as: "times", "courier", "arial"

generic-family - Common font family names: such as: "serif", "sans-serif", "cursive", "fantasy", "monospace.

Use a specific font family ( Geneva) depends entirely on whether the font family is available on the user's machine; this attribute does not indicate any font download. Therefore, it is highly recommended to use a generic font family name as a fallback.

Note: Separate each value with a comma .

Note: If the font name contains spaces, it must be enclosed in quotes. When using the "style" attribute in HTML, single quotes must be used.

The above is the detailed content of How to use css font attribute. 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