The CSS font element that can change the font are the font family, font size, Font-style, Font-variant, Font-weight, Color, Background-color, there is a difference between Serif and Sans-serif Fonts, Sans-serif fonts are always considered easier to read as compare to serif fonts on computer.
- Font Family: In CSS, there are two types of font family names:
- generic family –it is a group of font families with a similar look like “Serif” or “Monospace”
- font family – it is a specific font family like “Times New Roman” or “Arial”
|Generic family||Font family||Description|
|Serif||Times New Roman
|Serif fonts have small lines at the ends on some characters|
|“Sans” means without – these fonts do not have the lines at the ends of characters|
|All monospace characters has the same width|
- Font-size: If you want to change the size of the font. You have to define the size as an percentage size, relative size, absolute, or length.font-size : small
- Font-style: Changes the style from normal to italics or oblique.font-style : italic
- Font-variant: If you want to change the look of the text from normal to small-caps.font-variant : small-caps
- Font-weight: If you want to change the font to bold.font-weight : bold
- Color: If you want to change the color of your text. Use either named colors or hexadecimal codes.color : #ff0000
- Background-color: If you want to change the color behind the text. Use either named colors or hexadecimal codes.background-color : yellow;
Part 3 of this tutorial will be coming soon keep reading.Thanks!