CSS | Styles | Colors | Type | Classes-IDs | Layout | Properties | Value Types
Type defines the text of words and paragraphs. The font-family property defines the font of any selected text element. More than one font value is usually declared for each element, as some fonts may not be available. The availability of fonts vary from computer to computer. Each value is separated by a comma. Font values with more than one word must be declared within "quotes". The CSS file is coded as...
The XHTML file is coded as...
The output to the browser is...
This is a paragraph.
Generic font values can be declared based on category, such as serif, sans-serif, monospace, cursive, and fantasy. Generic fonts are usually a third option, if the first two fonts are not available.
Serif fonts have serifs, small edges that extend from each text character, making longer paragraphs of text easier to read. Serif fonts are common for printing. Sans-serif fonts do not have serifs. Sans-serif fonts are common for the web. Both types are used interchangeably. Monospace fonts have a fixed width for each text character. Monospace fonts are commonly used for computer code formatting. Cursive and fantasy fonts are designer fonts that vary across different computers.
The font-size property defines the font size of a selected text element. The CSS file is coded as...
The XHTML file is coded as...
The output to the browser is...
This is a paragraph.
The font-style property defines the font style of a selected text element, allowing the predefined values of normal, italic, oblique, and normal. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The font-weight property defines the font weight of a selected text element, allowing the predefined values of lighter, normal, bold, bolder, and normal. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The text-align property defines the text alignment of a selected text element, allowing the predefined values of left, right, center, and justify. The text-align property can only be applied to block elements. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The text-decoration property defines the text decoration of a selected text element, allowing the predefined values of underline, overline, line-through, and none. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The word-spacing property defines the word spacing (tracking) of a selected text element. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The letter-spacing property defines the letter spacing (kerning) of a selected text element. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The text-indent property defines the text indent of a selected text element. The CSS file is coded as...
The output to the browser is...
This is a paragraph.
The line-height property defines the line height of a selected text element, which is the amount of space between each line. The CSS file is coded as...