Class Exercise 8:
Utilize different CSS font properties
Goal:
Practice using CSS Font properties and link a Google Font to your
html file.
Instructions:
- Unzip the folder to get started.
Setup your Files:
-
In your “Foundations of Web Design” folder, create a new folder
named “Week 4”.
-
Open your “Week 4” folder and drag the files from the “starter_code”
folder into your “Week 4” folder.
- Open your “CE08” folder and edit the “CE08.html” file.
Add Internal CSS to your HTML File:
-
Use the
<style>
tag and add the following CSS
styles:
-
Change the color of
<p>Color</p>
to
"coral" color.
-
Change the font size of
<p>Font Size</p>
to 2X the size of the
root font size.
-
Change the font weight of
<p>Font Weight</p>
to 900.
-
Change the font family of
<p>Font Family</p>
to the Google font
Caveat with regular (400) font weight. Link:
https://fonts.google.com/specimen/Caveat
-
Change the
<p>Text Align</p>
to right
align.
- Change the root (html element) font size to 30px.
Viewing Your Web Page:
-
Run Your Project with Live Server:
-
Right-click on your “CE08.html” file and select “Open with Live
Server”.
- This will open your web page in your default browser.
- You should now see your custom-styled web page.
-
Run Your Project with Live Preview:
-
Right-click on your “CE08.html” file and select “Show Preview”.
-
This will open your web page in a tab in VS Code next to your
HTML file.