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
[…] a side note, I just published a CSS Tutorial about font-size over on CSSvideos.com […]
Thanks for this tutorial Ashton! I can’t wait for more videos outlining the properties of CSS!
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. 🙂
Haha. Thanks.
I do have a bitcoin account, but haven’t figured out any donation apps yet. 😉 Know of any good ones?
[..] CSS Font-Size | CSS Video Tutorials [..]
Thanks so much for your clear explanations. They taught me in 30 minutes what a professor took 3 hours to explain.