CSS Fonts

CSS Fonts

CSS font properties control how text looks — its style, size, family, and weight.


1️⃣ font-family

Sets the type of font.
Use multiple fallback fonts.



2️⃣ font-size

Controls the size of the text.


Common units → px, em, rem, %


3️⃣ font-weight

Controls thickness of the text.



4️⃣ font-style

Used for italic or oblique text.



5️⃣ font-variant

Small-caps style.



6️⃣ line-height

Spacing between lines of text.



7️⃣ Font Shorthand

Set everything in one line.



📌 Example (Simple)


 

You may also like...