🎯 Unit 3 Activities
Table of Contents
💻 ACTIVITY PROGRAM SETUP INSTRUCTIONS
- Go to the public template repository for our class: BWL-CS HTML/CSS/JS Template
- Click the button above the list of files then select
Create a new repository
- Specify the repository name:
CS1-Unit3-Activity#
Replace
#
with the specific activity number. - Click
Now you have your own personal copy of this starter code that you can always access under the
Your repositories
section of GitHub! 📂 - Now on your repository, click and select the
Codespaces
tab - Click
Create Codespace on main
and wait for the environment to load, then you’re ready to code!
🛑 When class ends, don’t forget to SAVE YOUR WORK! Codespaces are TEMPORARY editing environments, so you need to COMMIT changes properly in order to update the main repository for your program.
There are multiple steps to saving in GitHub Codespaces:
- Navigate to the
Source Control
menu on the LEFT sidebar - Click the button on the LEFT menu
- Type a brief commit message at the top of the file that opens, for example:
updated main.py
- Click the small
✔️
checkmark in the TOP RIGHT corner - Click the button on the LEFT menu
- Finally you can close your Codespace!
🖼️ ACTIVITY #1: Art Gallery
We will build a professional-looking webpage for a fictional art gallery using ONLY Bootstrap classes for all of the styling and layout.
PART A: Design a Hero Section
-
Decide on a theme! Your gallery can be focused on an art history period (Renaissance, impressionist, postmodern, etc.), an artistic medium (photography, sculpture, etc.), or specific subject.
-
In your HTML’s
<body>
section, add two<div>
elements with Bootstrap container classes. One should be a fluid container, the other a fixed container. -
In the fluid container div, include an
<h1>
element with a title for your gallery, and a<p>
element with a description of your gallery. -
Download an image that represents the “storefront” of your gallery and upload it to your repository’s File Explorer tab.
-
In the fixed container div, include an
<img>
element with thesrc
set to your storefront image. Give the image a class ofclass="img-thumbnail"
.
PART B: Apply Styles with Typography & Color Classes
Now that your page has some opening content, let’s enhance the appearance using Bootstrap’s built-in typography and color utility classes.
-
Use text classes to change the appearance of your gallery’s title and description. Try adding emphasis with classes like
fw-bold
,fst-italic
, ortext-uppercase
. 👉 Optional challenge: Usedisplay-*
classes for oversized titles (e.g.,display-1
,display-2
…). -
Choose a color scheme for your hero section. Use text color, background color, and border utility classes from Bootstrap. Make sure your colors complement each other! 👉 Examples:
bg-dark text-light
,border border-primary
,bg-warning text-dark
, etc. -
Try adjusting spacing with Bootstrap’s margin (
m-*
) and padding (p-*
) utility classes to better position your elements on the page. -
Optional: Use
text-center
,text-end
, ortext-start
to align your text.
PART C: Set up a Responsive Grid Structure
Let’s create a layout for your artwork using Bootstrap’s grid system.
-
Inside a
<div class="container">
, add a<div class="row">
to begin your grid. -
Create at least 3 columns (
<div class="col">
) inside your row. These will hold the featured artwork for your gallery. -
Explore responsive column classes like
col-sm-6
,col-md-4
, orcol-lg-3
to make your layout adjust on different screen sizes. 👉 Try mixing column sizes to experiment with how Bootstrap adapts your layout! -
Give each column a unique border or background color class so you can easily see the structure.
PART D: Populate the Grid with Images
Time to bring your gallery to life by adding some artwork!
-
Inside each column from Part C, add an
<img>
element to showcase a piece of art. You can find royalty-free artwork online (e.g., Unsplash, Pexels, or WikiArt). -
Use the Bootstrap class
img-fluid
on your images so they scale correctly on all screen sizes. -
Add a caption below each image using a
<p>
or<small>
tag. Style these captions usingtext-muted
,fw-light
, or alignment classes (text-center
, etc.). -
Optional: Wrap each image and caption in a
<div class="card">
to give it a framed, elevated look. Try combining withshadow
,border
, orrounded
classes for extra polish.