css font property


  Translation results:

UK[fɒnt] US[fɑ:nt]

n. Font; font; baptistery (located in a church, often made of stone); (same font and size) a set of typefaces

Plural: fonts

css font propertysyntax

Function: Set all font properties in one statement.

Description: 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. The following properties can be set in order: font-style, font-variant, font-weight, font-size/line-height, font-family. It is not necessary to set one of the values, such as font:100% verdana; is also allowed. Properties that are not set use their default values.

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

css font propertyexample

<html>
<head>
<style type="text/css">
p.ex1
{
font:italic arial,sans-serif;
}

p.ex2
{
font:italic bold 12px/30px arial,sans-serif;
}
</style>
</head>

<body>
<p class="ex1">php中文网CSS词典</p>
<p class="ex2">php中文网程序员专用词典/p>
</body>
</html>

Run instance »

Click the "Run instance" button to view the online instance

Popular Recommendations

Home

Videos

Q&A