What does adding a slash do in the font property for CSS?

This is actually a shorthand for font size (first metric) and line-height (second metric) and font-family.

font: 12px/16px "Times", serif;

… is the same as…

font-size: 12px;
line-height: 16px;
font-family: "Times", serif;

Notes

– In order to use this shortcut you must have the size, line height AND font-family specified or it will not work.

– This shorthand works in all modern browsers, but not in emails.

Back to Blog

Say Hello

You can reach me by email, I'd love to hear from you.