RSS
CSS Videos
By Ashton Sanders

CSS Properties

CSS Font-Size

StupidMehOkayGreatAwesome!
(23 votes, avg: 4.04/5)
Loading...

Video Transcript:

Welcome to CSSVideos.com. My name is Ashton Sanders, and now that we’ve gotten the Basics of CSS out of the way, we’ll start with some simple CSS properties for styling text. The first property we will cover is:

Font-Size

This property, as expected, declares the size of the text (letters, numbers, characters, etc.) in an element. Here is a simple example of making the text in all paragraphs 14 pixels tall:

p { font-size: 14px;}

Note: This is NOT text-size; it is font-size. Text-size is NOT a CSS property.

Font-Size Values

Font-Size has a many possible values besides a unit of measurement (like the first example). You can also use a percentage for the height. You can also use these preset values (comma separated):

xx-small, x-small, small, medium, large, x-large, xx-large, smaller, larger, inherit

Font-Size, by default, is set to “medium.”

Here’s another example of making the font in the <div class=”leftcolumn”> large:

div.leftcolumn { font-size: large;}

Thank you for watching this CSS Video. Let me know if you didn’t understand anything in this CSS tutorial.

Ashton Sanders
CSSVideos.com

This entry was posted by Ashton Sanders on Saturday, April 23rd, 2011 at 2:07 am and is filed under CSS Properties, Text/Font. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

 
 
.love { css: awesome }