Using Google Fonts
There are over 1,400 fonts hosted by Google for you to use..
How to Use the Google Fonts Website
- Go to fonts.google.com
- Narrow fonts down by Categories
- serif
- sans-serif
- display (fantasy)
- handwriting (cursive)
- monospace
- Narrow fonts down by Font properties
- number of styles
- thickness
- slant
- width
- Update the preview
- type custom text (see how the fonts look with your text)
- change the font size
- Click on a font you like
- Next to the style you like, click "Select +"
- Repeat until you have select all the fonts you want for your assignment
- Under Selected families, to the right, check the @import radio button
- Copy the @import line (not the <style> tags)
- Paste it into the top of your CSS stylesheet (must be at the top)
- Copy the font-family declarations
- Paste them into the CSS rules to use those fonts
An Example
This is an example where we selected TWO Google fonts. Both fonts are in the @import line.
@import url('https://fonts.googleapis.com/css2?family=Monoton&family=Playfair+Display&display=swap');
h1 {
font-family: 'Monoton', cursive;
font-weight: normal;
}
p {
font-family: 'Playfair Display', serif;
}