RSS
CSS Videos
By Ashton Sanders

CSS Properties

CSS Font-Size

StupidMehOkayGreatAwesome!
(14 votes, avg: 4.50/5)
Loading ... 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.

6 Responses to “CSS Font-Size”

  1. [...] a side note, I just published a CSS Tutorial about font-size over on CSSvideos.com [...]

  2. Austin says:

    Thanks for this tutorial Ashton! I can’t wait for more videos outlining the properties of CSS!

  3. RBNZ says:

    Thanks, just watched all your videos. Helped me understand the basics VERY quickly.

    You should set up a bitcoin account so people can send you donations. :)

    • Ashton Sanders says:

      Haha. Thanks.

      I do have a bitcoin account, but haven’t figured out any donation apps yet. ;) Know of any good ones?

  4. Lucinda Waltersdorf says:

    [..] CSS Font-Size | CSS Video Tutorials [..]

  5. jan says:

    Thanks so much for your clear explanations. They taught me in 30 minutes what a professor took 3 hours to explain.

Leave a Reply

 
 
.love { css: awesome }