Font shorthand in CSS

A little back to basics but useful nonetheless…

If you’re writing this:

font-weight:bold;
font-style:italic;
font-variant:caps;
font-size:1em;
line-height:1.5em;
font-family:arial,sans-serif

…you’re missing out on the shorthand:

font: bold italic small-caps 1em/1.5em arial,sans-serif

Just remember that you must always state both font size and family each time you write it and family must be at the end. Style, variant and size will always default to normal.

Book a FREE Consultation Today

Pick a day & time in the calendar that suits you for a 30 minute phone, video or in-person* meeting to run through your needs and explore options.

Please include a brief summary of your request along with any existing links, etc.

* In-person visits available in the Isle of Purbeck, Dorset and surrounding areas only