HTML Font Style List
HyperText Markup Language (HTML) is a coding standard that is used to define the elements of a website's layout and content. Text can be manipulated in a variety of ways, changing the font style that is displayed in a browser. These are called the font properties. Some of these are native to HTML and others are implemented through the use of Cascading Style Sheets (CSS).
-
Font Family
-
Fonts of a similar genre are grouped together in a font family for ease of use. Each font family contains an ordered list of fonts. When a font family is set, a browser will try to display the page using the first available font from the list that the computer has in its font library. A font family can be manually defined. Five generic font families are standard in HTML: serif, sans-serif, cursive, fantasy and monospace. An example in HTML would be <p style="font-family: cursive;">A Cursive Font Example</p>
Font Style
-
The font style property is used to set a font as normal (normal) or italicized (italic or oblique). A font in its normal capacity would be untouched and regular. An italicized font can exist in two forms: italic or oblique. An italic font is one that has been created in an italicized (slanted) form. An oblique font is one that has been electronically slanted to give the appearance of italicized font. Coding for italic style will result in text that displays in an italic font if available; otherwise it will resort to an oblique font. An example in HTML would be <p style="font-style: oblique;">An Oblique Font Example</p>
-
Font Size
-
The property of font size changes how big or small the font is displayed on the browser. There are four main methods for defining font size: Absolute Size, Relative Size, Length and Percentage. Absolute sizes are defined on a scale from xx-small to xx-large as follows: xx-small, x-small, small, medium, large, x-large and xx-large. Relative sizes will change the font relative to its current size, using the options larger or smaller. Length allows for a size to be set in the following format: Xpt, where X is the point size. A percentage value will enlarge or decrease the font relative to its current size by the defined amount, defined as Y%, where Y is the percentage. An example in HTML would be <p style="font-size:xx-small;">An XX-Small Font Example</p>
Font Weight
-
The use of font weight defines how bold the displayed font will be. There are three categories: standard, relative and absolute values. Standard choices are normal and bold. Relative options are bolder and lighter, and will increase or decrease a font's weight respectively. The absolute values are defined on a sliding scale between 100 and 900 in increments of 100. On this scale, normal is defined as a value of 400 and bold a value of 700. An example in HTML would be <p style="font-weight: bold;">A Bold Font Example</p>
-
References
- Photo Credit Comstock/Comstock/Getty Images