Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
When adding a second font family to a web page or web site, it can be added directly to the elements that will use that font family. Element level styling overrides the universal selector. You will see our font family for the page is currently Georgia. All text is the same size. The only difference is the heading is bigger and in italic. We are going to change the h1 to Verdana, all caps, slightly smaller, with letter-spacing and we are going to bold it too. So open up the CSS file. You will see the universal selector in this file has the font family set to Georgia.
That's why all the text in the page is the same font. The h1 currently 24 pixels, it's italic, and the P tag is currently 15 pixels with a 22 pixel line height. I've added the p styling since the last lesson. Under the h1 let's make some changes. We will add the font family Verdana, comma, sans- serif, because we should always build a font stack.
We will add the text-transform uppercase because we want it to be in all caps. We will change the font size to 14 pixels because we want it to be a little bit smaller than out text. We will get rid of the italic. We will change our font weight to bold because we want it bold. And we are going to add a letter- spacing of 1 pixel to sort of lighten it up, make it a little bit more elegant.
Let's save these changes and review our page in our browser. All the changes have been applied to our h1 tag. Using the universal selector and the h1 element we created cascading styles, we added a second front to the h1, and attended to case, size, weight and letter-spacing. We managed to keep our text looking elegant and traditional. In the next lesson, we are going to visit Google.com web fonts and choose a sans serif font to use in the sans serif version of this text.
Get unlimited access to all courses for just $25/month.Become a member
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.