Defining Fonts
In the last lesson we stepped into the world of text as we defined the overall flow of our text. In this lesson we will learn how to define the font, size and other character level tasks. By the end of this lesson, you will know how to style the copy in HTML using CSS rules.
Video Transcript
00:00It's time that we talk about the actual font and we're gonna go through a lot of different things if it's the font family if it's
00:06the color if it's the size if it's the
00:10Anything else really we're gonna go through all the critical things you need to know about how to control the way
00:14That your text looks like on a page in this lecture. So let's get right to it
00:19This lecture is gonna be a little bit long. So let's jump right into it. We're talking about fonts
00:25There's a lot of talk about I'm gonna spit stay in that h1 span and I'm just gonna work through all the different font
00:34Variations font edit variations that we have so I'm going to start off with the first one
00:38Which is gonna be the font style now the font style accepts a few different properties
00:43The default is normal but I can then go ahead and set it to be italic for example or a bleak
00:49And I'm just gonna go ahead here and just some
00:54leave behind
00:58Where is that
00:59That's what happens when you apply time. Let me turn on the light if you knew how complicated it is to find a keyboard one
01:07Day is not in beautiful. All right. So now that I have that set there. Let me just put inside here my
01:15Options you go ahead there and play with the options. All right, beautiful. Now, let's just take a small peek at it
01:20I'll go to my browser click on refresh notice my copy here how it became
01:25Indented or not indented really became basically
01:29It's it's shifted. It became oblique. Well, that is the word, right? All right, so let's continue so that so that's our font style
01:35The next one is our font variant. Now the font variant is quite cool
01:40There's the normal which is what we usually have and then really our second option is small caps now
01:46Hopefully in the future there'll be other variations and other options there, but small caps what it does
01:50It basically makes all of our copy
01:54Use the uppercase fonts
01:55Let me just showcase that to you and I'm just gonna go ahead here and I'm gonna get rid of the font size because I
02:01We're gonna get back to that in a few moments
02:03I'm just gonna set that to be just the regular size of the current each one that we're had so we could see it
02:08More vividly. So if I go ahead here and click on refresh, we'll see that notice how the copy is all upper case
02:15And it's all in the same size
02:17So that's our small caps and our small caps if I go ahead here for example in
02:23Contrary to our copy that we have here that is all because it's all locates if I go ahead here and just set is good
02:29You'll see that there'll be a slight difference where the uppercase letters would be slightly larger
02:35So it basically keeps everything in uppercase, but it a little bit slower than the uppercase of the larger characters
02:41enabling you to create a more
02:43Interesting design when it comes to titles and such. Alright, so let's continue
02:47Back into our styling. We saw our variant. We saw
02:52Our variant there we go
02:53That was our variant and let's move on to the next item which is the font weight and the font weight is quite simple
02:59The font weight there are also
03:03Actual text
03:05Options, but we're not gonna talk about them
03:07400 is normal, but really just from because from it is way more intuitive to work in the hundred to nine hundred
03:14We're basically the value would be a value between a hundred and nine hundred that would reflect
03:19How would you want your fonts with?
03:21Weight to be so if 400 is the default you wouldn't see any difference
03:25But what if we wanted don't well in this case?
03:28We've made it thinner
03:29But if we if we wanted to make it bold we would go ahead there and just set it to be
03:3370700 and we'd set ourselves a nice fat font if we wanted to make it really skinny
03:39We could go ahead all the way down to a hundred making it really really really skinny
03:44So that would be a hundred and I'm just gonna go ahead here and inspect my element
03:48So we could just play around with it directly and I could just literally just go ahead here and add that value and have
03:53It grow but really the growth is happening once we switch digits
03:57So when we move to 200 when we move to 300
04:00We really see those changes when we cross from a far way to 400 500
04:07How about we go to 900?
04:10So for some reason the it's not
04:13re-rendering dynamically, so I'll just go ahead here and just set it to be 800
04:18We'll save it go back click on refresh and we'll see a mightily
04:22Wide font but in this scenario what's happening is the font already reached the basically max
04:27Size that it's going to get and it's not getting any thicker than that. So if we go ahead here and just
04:34Apply this and just set it to be like a hundred
04:38You'll see that now it's really thin if I set it to 200 so not every font works perfectly for this kind of configuration
04:45And it's really a matter of playing around and finding how you would work best in your font layout and font options
04:51now if I go here and I make sure that the currently our global font family is
04:58chronica for our
04:59h1 if I go ahead here and I just take this font weight and instead of that I move it into one of our
05:05Paragraphs that is not working off of that
05:08Font then we would have a lot more control because we don't we're not working with an embedded font in this case
05:14We might just not have access to that font than that in other different weightness
05:18So if I'm sitting here 800 you'll see that now it's an incredibly with wide our paragraph
05:23let me just go ahead to any paragraph really and
05:27Let me well wasn't any paragraph was any article paragraph and I'll just go find that
05:33Where are you? Oh?
05:35Cuz I'm in the do
05:37bear with me for a second
05:39Let's find our paragraph are
05:42Where are you? Where are you?
05:45Thought wait there we go. Okay, so here you go
05:52So now notice how the as soon as we as we move down to 700 everything got reset almost to the level where
05:58You you're really not seeing anything because really we're talking about you have to change your values and hundreds of six
06:06500 400
06:08300 you're not always gonna see differences
06:10So you kind of have to test out based on the font itself and how small how big it really could get and that's really
06:16The game of fonts seeing how do they work and how to configure them? So let's continue. So we've seen
06:22Quite a lot of different options
06:23I'm gonna go ahead there and just grab that font weight and
06:26Just push it up back to where we were looking at all the different options for our fonts and oh, so
06:32I will go ahead and add here a commenting and in
06:35Put inside of it literally just the values between a hundred to nine hundred where there's gaps of a hundred so each
06:44One two so on alright, so all the way to nine hundred oh, that's a much better
06:50That's a much better way to describe it than what I just did there alright, so that was font weight
06:56Let's continue beyond font weight. We already saw our font size and we know how to work with it
07:00We can move on we've seen the font size
07:03Next one that I want to talk about is line height
07:05Now the line height enables me to change the height of the actual line itself in this case
07:10What if I wanted the actual line to be three times the size of our font now?
07:15I could put here any measurement value, but I'm just gonna go ahead here and put here this the 3em
07:20Which would make it three times larger
07:23By the way if I would set it to be just three that is exactly that default
07:27Which is that multiplier basically a number that is positioned inside of here is just a multiplier based on the line
07:33So so 3 or 3e or 3m are basically the same thing just as much as 300 basically
07:39They're all the exact same thing so in the case of I set it to 300. I would get the exact same value
07:47So really the less is more so in this case
07:49I could just put your three and expect to get the exact same thing without defining one
07:54Alright, so that's for line height, and there's one more item left in which is the font family
08:00We met the font family before, but I want to talk about it a little bit further
08:05Beyond the fact that we saw that we used really early on we embedded a Google font and then positioned a font
08:11That was an absolute font. I could go ahead and just set a font excuse me and set a font family
08:19not font family and
08:22I could set that font family to be oh so
08:25Any font really and I want to talk about one is like any time your font has more than one word
08:31So if the name of the font like in this example here is a la conica. I could have wrote it without any actual
08:37Quotes around I could have literally just gone and set it to be that way and that's completely fine
08:42But if for example the font was called a la conica nice
08:45I would have to wrap it around a commenting if there's a dot in it if there's anything irregular if there's a
08:51Anything that is not just like one regular English word then would go ahead and wrap it with a quote around it
08:58Now if it's if it is just a regular just like we have here
09:02Then we don't need it, and I want to talk about a few other things
09:05And there's a look what if you don't have a specific font in mind, but you want a certain font family now to do that
09:12I'm gonna split this video into another lecture and in the next lecture
09:15I want to just walk through the different types of fonts that are available to you that you could basically use
09:21Or font families that it for example in scenario
09:23We're not embedding a font
09:25What are the font families just to get a little bit more familiar with them?
09:28And once we do we're gonna finish up and wrap up the actual font property as well
09:33So we'll see in the next lecture when we wrap up this topic of fonts
