Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


CSS: Fonts and Text : Page 5

Learn all kinds of things about altering fonts and text.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

Line Height: {line-height: normal/XXunits/%}
The line-height specifies the space from the baseline of one line of text to the baseline of the next.

If you are familiar with typesetting, you've called this measurement leading. If you worked with desktop publishing, you may have called it line space.

You can specify line height in either absolute (most likely points) or relative (mostly likely percentage) values. The line height you use will depend on the font style and size. Some fonts look better with more "breathing space" while others work best set more solidly. Good starting points to try are 12 point text with 14 point line height or 120% line height.


P {font-size: 10pt; line-height: 12pt}

If you are using a CSS-enabled browser, this paragraph is 10 point text with a line-height value of 12 points. Or, as we used to say in typesetting-speak, it is 10/12... "10 on 12."

P {font-size: 14pt; line-height: 28pt}

If you are using a CSS-enabled browser, this paragraph is 14 point text with a line-height value of 28 points. It should look "double-spaced."

P {line-height: 120%}

If you are using a CSS-enabled browser, this paragraph has a 120% line-height value. The actual amount of space from baseline to baseline will change with the size of the text.

Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date