Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does this size mean in css {font: 14px/24px Arial, Helvetica, sans-serif}

Tags:

css

font-size

What is 14px/24px here? Which is the real font size?

like image 977
Andrey Avatar asked Feb 22 '11 19:02

Andrey


People also ask

Which is used for font size of text in the CSS property sets?

The font-size CSS property sets the size of the font. Changing the font size also updates the sizes of the font size-relative <length> units, such as em , ex , and so forth.

What is CSS font properties?

CSS Font property is used to control the look of texts. By the use of CSS font property you can change the text size, color, style and more. You have already studied how to make text bold or underlined.

What are the font family in CSS?

In CSS (and in typography in general) there are five basic types, or families, of fonts: serif, sans serif, cursive, fantasy, and monospace.


2 Answers

It's the shorthand for the different font related properties. It means:

font-size: 14px; line-height: 24px;  font-family: Arial, Helvetica, sans-serif 

See: http://www.impressivewebs.com/css-font-shorthand-property-cheat-sheet/

enter image description here

like image 181
thirtydot Avatar answered Sep 19 '22 10:09

thirtydot


First is font-size the second is line-height

Quote from the specification for font shorthand

'font'
Value: [ [ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar | inherit

like image 28
Gabriele Petrioli Avatar answered Sep 19 '22 10:09

Gabriele Petrioli