CSS Typography

font-family:

This is a list of fonts used throughout the webpage in priority order of which font the browser can select. For instance, if the font family is “Helvetica”, sans-serif”, the browser will search through its available font library for Helvetica first, and choose any available sans-serif font if Helvetica is not found.

font-size:

This is simply the declaration of the size of the text on the screen. Simple values such as “small”, “medium”, or “large” can be used, or more exact measurements can be made with pixel or em values.

text-align:

Similar to what you may find in a document editor such as Word, this sets the text anchor alignment. As you can see on this page, all of the text by default is aligned to the left.

This, however, is aligned to the right.

And this in the center!

line-height:

This declaration determines how tall or short the empty space between lines of text is. Pixel and em values can be used here too, but values can be declared without values as well. The number becomes a ratio relative to the font size.

text-shadow:

As the name says, this declares the existence and properties of the drop shadow of the text. Size and color are both variable. Be weary of this one, as it is very easy to make text unreadable with poorly made shadows.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top