Roots
Back

CSS Text

Font Style

font-style: italic / oblique / normal;

italic - Italic text.
oblique - Oblique text. This is different from italic text in that it is supposed to simply be the current font, slanted. Most browsers, however, do not differentiate between italic and oblique text.
normal - Normal text.

Font Variant

font-variant: small-caps / normal;

small-caps - Text is displayed in small capital letters.
normal - Normal text.

Font Weight

font-weight: normal / bold / bolder / lighter / 100 / 200 / 300 / 400 / 500 / 600 / 700 / 800 / 900;

normal - Normal text.
bold - Bold text.
bolder - Bolder text.
lighter - Lighter text.
100 - 900 - 100 is the lightest font weight, 900 is the boldest.

Font Size

font-size: xx-small / x-small / small / smaller / medium / larger / large / x-large / xx-large / value / percentage / ;

xx-small - Text that is xx-small.

x-small - Text that is x-small.

small - Small text.

smaller - Text that is smaller than the current font size.

medium - Medium text.

larger - Text that is larger than the current font size.

large - Large text.

x-large - Text that is x-large.

xx-large - Text that is xx-large.

value - Specify the size of the text in pixels.

percentage - Specify the size of the text as a percentage of the containing element.

Font Family

font-family: family-name / serif / sans-serif / cursive / fantasy / monospace;

family-name - A specific font name.
serif - The default serif font.
sans-serif - The default sans-serif font.
cursive - The default cursive font.
fantasy - The default fantasy font.
monospace - The default monospace font.

Font Stretch

Most browsers do not yet support this feature.

font-stretch: normal / wider / narrower / ultra-condensed / extra-condensed / condensed / semi-condensed / semi-expanded / expanded / extra-expanded / ultra-expanded;

normal - Normal text.
wider - Wider font than normal.
narrower - Narrower font than normal.
ultra-condensed - ultra-expanded - The font from most condensed, to most stretched out.

Line Height

line-height: length / percentage / number;

length - A fixed distance in pixels between lines.
percentage - The distance between lines as a percentage of the current font size.
number - The number to multiply the current font size by to get the distance between lines.

Text Align

text-align: left / right / center / justify;

left - Align text to the left.
right - Align text to the right.
center - Align text in the center of the element.
justify - Align text so there is a straight edge on the left and on the right.

Text Decoration

text-decoration: overline / underline / line-through / none;

overline - Line over the text.
underline - Line under the text.
line-through - Line through the text.
none - Normal text.

Text Indent

text-indent: value / percentage;

value - Indent the first line of text by the given number of pixels.
percentage - Indent the first line of text by a percentage of the width of the element the text is in.

Text Transform

text-transform: uppercase / lowercase / capitalize / none;

uppercase - Set the text to uppercase.
lowercase - Set the text to lowercase.
capitalize - Capitalize the first letter of every word.
none - Normal text.

Word Spacing

word-spacing: value / normal;

value - Space words apart by the given number of pixels.
normal - Space words normally.

Letter Spacing

letter-spacing: value / normal;

value - Space letters apart by the given number of pixels.
normal - Space letters normally.

Quotes

quotes: first-open-quote first-close-quote / second-open-quote second-close-quote;

first-open-quote - The opening quote mark to use, in the first quote element.
first-close-quote - The closing quote mark to use, in the first quote element.
second-open-quote - The opening quote mark to use, in a quote element inside the first.
second-close-quote - The closing quote mark to use, in a quote element inside the first.