Font Styling and Web Fonts
Explore how to style fonts in CSS by using the font-family property, applying web-safe fonts, creating font stacks with fallbacks, and loading additional fonts like Google Fonts. This lesson helps you understand text stylization and ensures your web pages look consistent across devices.
We'll cover the following...
There are many CSS properties we can use on text-based elements to give the text different stylizations.
Changing font styles
You can change the font of your text using the font-family property.
If a font name contains spaces, then it must be wrapped in quotation marks (e.g. "Times New Roman") in order to be rendered properly.
Web-safe fonts
When a browser loads a web page, it will apply the font specified in font-family only if the font is loaded on the system. What do we mean by this? Running the same web page on a Windows desktop, an Android mobile device, or a Mac OS X laptop may ...