w1coding.comAll tutorials

CSS Fonts

CSS lessons
  1. Environment Setup
  2. Introduction
  3. Tdisplay
  4. Basics
  5. Editors
  6. Syntax
  7. Colors
  8. Background
  9. Borders
  10. Margins
  11. Padding
  12. Width And Height
  13. Outline
  14. Texts
  15. Fonts
  16. Icons
  17. Links
  18. Lists
  19. Display
  20. Tables
  21. Max And With
  22. Positon
  23. Z Index
  24. Dropdown
  25. Overflow
  26. Float
  27. Navigation
  28. Image Sprites

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.