CSS Fonts
Introduction to CSS Fonts
CSS font properties help to style the text by setting font families, sizes, weights, and styles, creating a more aesthetically pleasing appearance.
CSS Font Properties
- font-family: Specifies the typeface of text (e.g., Arial, Times New Roman).
- font-size: Sets the size of the text.
- font-weight: Defines the thickness of characters (e.g., bold, normal, light).
- font-style: Sets the style of text, such as italic.
Example
p {
font-family: 'Arial', sans-serif;
font-size: 18px;
font-weight: bold;
font-style: italic;
}
Browser Support
Font properties are universally supported by modern browsers.