24. Font-size Slides & Code

				
					
p{
font-size: 30px
}
h2{
font-size: 20px;
}
				
			

Video Summary

Alright, in this lesson we’re gonna talk about font size. And this is how we’re going to be able to dictate how large our font is to be. This is a pretty straightforward property value sets. Let’s hop over into code pen and see what we can do. 

Alright, so right now I have just a simple paragraph with just a bunch of lines. It says this is the paragraph but we’re going to be able to show you how we can manipulate the font size. So we come over here and plot font size, colon 40 pixels, it transforms our paragraph into 40 pixels. If we want to use let’s say 20 pixels, we can use 20 pixels. Also too, as you can use the E M function as we’re talking about units of measurement. It is two times the size or whatever you dictate the EM to be is going to be that many times the size of what the fonts currently at. So if we do to em. 

This time, it’s twice the size if we do three, three times the size we do for four times the size. And this is really this kind of comes into play once in a while when you’re talking about mobile optimization and having different different headings and paragraphs with different sizes on different devices. because they’re gonna be they’re gonna be viewed in a different frame. So this is how this was one of the times that you would use em but I always recommend just using pencils whenever possible because you can be able to get the precise measurement of the font that you need. So that being said let’s hop on our next lesson. 

PHP Code Snippets Powered By : XYZScripts.com