Final Exam (HTML + CSS)
Should I take this part of the exam?
- If you are happy with your Quiz 1 score (check Moodle to see), you DO NOT need to take this part of the exam.
- If you do want to replace your Quiz 1 score, download the starter files and follow the instructions below.
You are going to build the webpage pictured below:
Desktop
Tablet![]() |
Mobile![]() |
Part 1: Setup
Please download the starter files below (if you haven’t already):
Then, inside of the html-css-final-exam
folder, create a brand new HTML file called index.html
that is in the root of the html-css-final-exam
folder. If you did it correctly, your file structure should look like this:
html-css-final-exam
├── images
│ ├── img1.jpg
│ ├── img2.jpg
│ ├── img3.jpg
│ ├── img4.jpg
│ ├── img5.jpg
│ ├── img6.jpg
│ ├── img7.jpg
│ ├── img8.jpg
│ └── img9.jpg
├── index.html <-- Your new HTML file
└── pages
├── about.html
└── contact.html
Edit index.html
file by adding an HTML “skeleton” with the following tags:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
</body>
</html>
Part 2: HTML Tasks (40 Points)
Edit the index.html
pages as follows:
2.1. Metadata (2 Points)
- Add a
title
tag inside of thehead
tag, with the display text of “Final Exam”
2.2. Header Section (12 Points)
- Add a
header
tag inside thebody
tag (don’t get the head and the header tag confused). - Inside the
header
tag, create anh1
tag that displays the text “Final Exam” - Also inside the
header
tag and below theh1
tag, create a navigation section using thenav
tag. - Inside of the
nav
tag, create three hyperlinks:- One that links to
contact.html
(in the pages folder) with the display text of “Contact”. Use a relative path. - One that links to
about.html
with the display text of “About Us”. Also use a relative path. - One that links to Instagram’s home page, the display text of “Instagram”. Use an absolute path.
- One that links to
Note: you may NOT move the contact.html
or about.html
files outside of the pages
folder.
2.3. Main Section (6 Points)
- Below the
header
tag, create amain
tag. - Inside the
main
tag, create two children:- An h2 tag with the text of “Photo Gallery”
- A section that has a class of “photo-container”.
2.4. Photo Container (16 Points)
Inside of the “photo-container” section you will make 9 div tags.
- Each div tag should be assigned a class of
card
. - Each div tag will contain an
img
tag and ap
tag (for the caption).- Each
img
tag will point to one of the images in theimages
folder. - Use a relative path for each image source.
- Don’t forget to use the
alt
attribute to give each image a description (for people who use a screen reader).
- Each
2.5. Footer (4 Points)
Create a footer section below your main
section using the footer
tag. Within the footer, create a paragraph tag that says “Copyright Your Name, 2023.”
Part 3: CSS Tasks (56 Points)
Create a CSS file called styles.css
that is a direct child of the html-css-final-exam
folder. If you did it correctly, your file structure should look like this:
html-css-final-exam
├── images
│ ├── img1.jpg
│ ├── img2.jpg
│ ├── img3.jpg
│ ├── img4.jpg
│ ├── img5.jpg
│ ├── img6.jpg
│ ├── img7.jpg
│ ├── img8.jpg
│ └── img9.jpg
├── index.html
├── pages
│ ├── about.html
│ └── contact.html
└── styles.css <-- Your new CSS file
Edit your index.html
file by adding a link to your stylesheet. Then, complete the following tasks within styles.css
:
3.1. Header & Nav Bar (16 Points)
- Create some style rules for the
body
element:- Set the background color to a light gray (
#F0F4EF
) - Set the font family to
Arial, Helvetica, sans-serif
- Set the margin to
0
- Set the background color to a light gray (
- Create some style rules for the
header
element:- Set the background color to
#222222
- Set the height to
10vh
- Set the left and right padding to
10vw
- Set the background color to
- Create some style rules for the
h1
element (and any relevant child elements) to:- Set the font color to
white
- Set the font size to
1.2em
- Set the font color to
- Create some style rules for
a
elements inside thenav
element:- Set the link color to
white
- Set the text decoration to
none
- Set the link color to
3.2. Custom Font (8 Points)
Use the “Tangerine” Google font to style the h2
tag (see screenshot above).
3.3. Main (2 Points)
Set the left and right padding of the main
tag to 10vw
.
3.4. Gallery Layout (10 Points)
Create some style rules for the photo-container
class that implement the following requirements:
- Use CSS Grid
- Define three evenly spaced columns
- Create a column gap and row gap of
30px
.
3.5. Card Styling (10 Points)
Create some style rules for the card
class that implement the following requirements:
- The background should be white
- The border should be solid and light gray
- The image contained inside the card should span the full width of its div container
- The caption should not be too close to the sides of the div
3.6. Footer (2 Points)
Create some style rules to set the footer’s background color to #222222
, and the footer’s text color to white.
3.7 Responsive Design with Media Queries (8 Points)
- When the width of the screen is less than
1200px
, thephoto-container
section should display two cards per row. - When the width of the screen is less than
600px
, thephoto-container
section should display one card per row.
Part 4: Accessibility Tasks (4 Points)
Run the WAVE extension and make sure there are no accessibility issues. Correct any issues that you find.
What to Submit
Please read carefully: Doublecheck your work to make sure you’ve completed all of the tasks. Then, update your homepage by adding a linking to the index.html page you just completed. After committing and syncing your changes to GitHub, paste a link to your homepage on GitHub pages into the Moodle.
- If your GitHub is not working for whatever reason, just zip your COMPLETED
javascript-final-exam
folder and upload it to the Moodle.