4. Fonts #
Created Tuesday 16 June 2020
which font #
- Syntax:
font-family: Menlo, Montserrat, 'Segoue UI', serif;
- the latter ones are fallbacks if a previous one isn’t available. CSS font families:
- Generic family: serif or monospace or sans-serif
- font-family: a specific family viz apple, Arial, Times New Roman
Note:
- For multi-worded families, use quotes (single or double both are OK).
- More than one fonts can be seperated by commas. Leftmost is used, if available.
- Sans-serif are considered much easier to read on screens
- Many fonts are available at sites, like Google Fonts. They provide CSS file links, to be used in the
<link href="" />
.
Font UI properties #
color
: color of the font.font-size
: kpx; // shouldn’t be used for headings, as we have h1 to h6 for them, decreasing.font-weight
: normal or boldfont-style
: normal, italic or obliquefont-variant
: normal or small caps(makes everything uppercase but height is preserved)