codegurukool.com · Free coding tutorials & online compiler

Home › CSS Tutorial › CSS fonts

CSS fonts

Choose family, size and weight.

List fallbacks in font-family. Use font-size, font-weight, font-style and the font shorthand.

Example code

<style>
p{font:italic 700 22px Georgia,serif}
.s{font-family:Arial,sans-serif;font-weight:300}
</style>
<p>Serif bold italic</p><p class='s'>Sans light</p>

Run this code in the online editor

← CSS textCSS icons →