Foundations of Web Design
Home
Course Info
Class Slides
Class Exercises
Projects
Resources
Class Exercise 5:
Styling an HTML page with CSS
Goal:
Style an existing HTML File using these CSS Properties:
background-color
font-size
color
text-align
border
margin
padding
Instructions:
Download
starter_code05.zip
:
Unzip the folder to get started.
Setup your Files:
In your “Foundations of Web Design” folder, create a new folder named “Week 3”.
Open your “Week 3” folder and drag the files from the “starter_code” folder into your “Week 3” folder.
Open your “CE05” folder and create a CSS file named “styles.css”.
Fill in your CSS File:
Open your “styles.css” file.
Copy the following CSS Selectors into the file:
body { } .header { } .navigation { } .content { } .contact { } .footer { }
Modify the existing CSS and use all the CSS properties from the goals.
Viewing Your Web Page:
Run Your Project with Live Server:
Right-click on your “CE05.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 “CE05.html” file and select “Show Preview”.
This will open your web page in a tab in VS Code next to your HTML file.