Skip to content

About

Session 16: HTML & CSS Foundations ๐ŸŽจ

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

ย 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸŒ HTML & CSS Foundations

๐Ÿ“ธ Lesson Snapshot

Build beautiful web pages with HTML structure and CSS styling! Learn the building blocks of every website. (Ages 8-18)

Session Date: Saturday, March 7, 2026 at 11:00 AM EST


๐ŸŽฏ Age-Tiered Learning Goals

๐Ÿง’ Elementary (8-11) ๐Ÿง‘ Middle School (12-14) ๐ŸŽ“ High School (15-18)
๐Ÿ—๏ธ HTML Create basic pages with headings and paragraphs Use semantic elements properly Build accessible, well-structured pages
๐ŸŽจ CSS Change colors and fonts Use Flexbox for layouts Implement responsive Grid layouts
๐Ÿ By End Style a simple book card Build a complete book display Create a responsive library interface

๐ŸŽจ Before You Code: Hands-On Activities (15 minutes)

๐ŸŽฎ Activity 1: The House Blueprint Game (Whole Class)

๐ŸŽฌ Setup: Students stand in a circle

๐Ÿ“– Scenario: HTML is like a house blueprint

    BUILDING A HOUSE ๐Ÿ  = BUILDING A WEBPAGE ๐ŸŒ

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚   HOUSE PARTS              WEBPAGE PARTS                โ”‚
    โ”‚   โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€              โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                 โ”‚
    โ”‚                                                         โ”‚
    โ”‚   ๐Ÿ  Foundation     =     <!DOCTYPE html>               โ”‚
    โ”‚      "What type           "What type of                 โ”‚
    โ”‚       of building"         document"                    โ”‚
    โ”‚                                                         โ”‚
    โ”‚   ๐Ÿšช Front Door     =     <header>                      โ”‚
    โ”‚      "Entry point"        "Top of page"                 โ”‚
    โ”‚                                                         โ”‚
    โ”‚   ๐Ÿ›‹๏ธ Living Room    =     <main>                        โ”‚
    โ”‚      "Main area"          "Main content"                โ”‚
    โ”‚                                                         โ”‚
    โ”‚   ๐Ÿณ Kitchen        =     <section>                     โ”‚
    โ”‚      "Specific room"      "Specific area"               โ”‚
    โ”‚                                                         โ”‚
    โ”‚   ๐Ÿš— Garage         =     <footer>                      โ”‚
    โ”‚      "Bottom area"        "Bottom of page"              โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ฌ Discussion:

"Just like a house has rooms with specific purposes, a webpage has sections! The <header> is like your front entrance, <main> is your living room where the action happens, and <footer> is like the basement - always at the bottom!"


๐Ÿ’ƒ Activity 2: The Box Model Dance (Whole Class)

๐Ÿ“ฆ Stand up and become a CSS box!

    THE CSS BOX MODEL - YOU ARE THE CONTENT! ๐Ÿง

    Stand in place - YOU are the content!

    Step 1: CONTENT ๐Ÿ“
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  Stand still with arms at your sides                    โ”‚
    โ”‚  "I am the CONTENT - the actual text or image!"         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    Step 2: PADDING ๐Ÿงธ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  Stretch arms out to make space around yourself         โ”‚
    โ”‚  "PADDING is space between ME and my border!"           โ”‚
    โ”‚  "It's like a cushion around me!"                       โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    Step 3: BORDER ๐Ÿ“ฆ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  Draw a box shape in the air around yourself            โ”‚
    โ”‚  "BORDER is the line around my box!"                    โ”‚
    โ”‚  "It can be thick, thin, solid, or dashed!"             โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    Step 4: MARGIN ๐ŸŒŒ
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  Take a big step back from your neighbor                โ”‚
    โ”‚  "MARGIN is space between ME and other boxes!"          โ”‚
    โ”‚  "It's my personal space bubble!"                       โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ก Key Insight:

"Every element on a webpage is a box! Content + Padding + Border + Margin = The complete box!"


๐Ÿƒ Activity 3: Tag Matching Card Game (Groups)

๐Ÿ”€ Match the HTML tags with what they do:

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  MATCH THE TAGS! ๐Ÿท๏ธ                                     โ”‚
    โ”‚                                                         โ”‚
    โ”‚  HTML TAG              WHAT IT DOES                     โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€              โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                     โ”‚
    โ”‚                                                         โ”‚
    โ”‚  <h1>                  "A clickable link"               โ”‚
    โ”‚  <p>                   "The biggest heading"            โ”‚
    โ”‚  <a>                   "An image"                       โ”‚
    โ”‚  <img>                 "A paragraph of text"            โ”‚
    โ”‚  <ul>                  "A container box"                โ”‚
    โ”‚  <li>                  "An unordered list"              โ”‚
    โ”‚  <div>                 "A list item"                    โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    ANSWERS: โœ…

    <h1>  โ†’ "The biggest heading" ๐Ÿ“ฐ
    <p>   โ†’ "A paragraph of text" ๐Ÿ“
    <a>   โ†’ "A clickable link" ๐Ÿ”—
    <img> โ†’ "An image" ๐Ÿ–ผ๏ธ
    <ul>  โ†’ "An unordered list" ๐Ÿ“‹
    <li>  โ†’ "A list item" โ€ข
    <div> โ†’ "A container box" ๐Ÿ“ฆ

๐Ÿ—บ๏ธ Visual: HTML Document Structure

    THE ANATOMY OF AN HTML PAGE ๐Ÿฆด

    <!DOCTYPE html>              โ† ๐Ÿ“œ "I'm an HTML5 document!"
    <html lang="en">             โ† ๐ŸŒ The whole page starts here
    โ”‚
    โ”œโ”€โ”€ <head>                   โ† ๐Ÿง  The brain (invisible info)
    โ”‚   โ”‚
    โ”‚   โ”œโ”€โ”€ <meta charset>       โ† ๐Ÿ”ค Character encoding
    โ”‚   โ”œโ”€โ”€ <title>              โ† ๐Ÿ“‘ Browser tab title
    โ”‚   โ””โ”€โ”€ <link>               โ† ๐ŸŽจ Connect to CSS file
    โ”‚
    โ””โ”€โ”€ <body>                   โ† ๐Ÿ’ช The body (visible content)
        โ”‚
        โ”œโ”€โ”€ <header>             โ† ๐ŸŽฉ Top section (logo, nav)
        โ”‚   โ””โ”€โ”€ <nav>            โ† ๐Ÿงญ Navigation links
        โ”‚
        โ”œโ”€โ”€ <main>               โ† โญ Main content area
        โ”‚   โ”‚
        โ”‚   โ”œโ”€โ”€ <section>        โ† ๐Ÿ“ฆ Grouped content
        โ”‚   โ”‚   โ””โ”€โ”€ <article>    โ† ๐Ÿ“ฐ Self-contained content
        โ”‚   โ”‚
        โ”‚   โ””โ”€โ”€ <aside>          โ† ๐Ÿ“Ž Sidebar content
        โ”‚
        โ””โ”€โ”€ <footer>             โ† ๐Ÿ‘Ÿ Bottom section
            โ””โ”€โ”€ <p>              โ† ๐Ÿ“ Copyright, links

    </html>                      โ† ๐Ÿ End of page

๐Ÿ—บ๏ธ Visual: CSS Box Model

    THE CSS BOX MODEL ๐Ÿ“ฆ

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                      MARGIN                             โ”‚
    โ”‚    (Space outside - your personal bubble) ๐ŸŒŒ            โ”‚
    โ”‚                                                         โ”‚
    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”‚
    โ”‚    โ”‚                 BORDER                        โ”‚    โ”‚
    โ”‚    โ”‚    (The edge of your box) ๐Ÿ“ฆ                  โ”‚    โ”‚
    โ”‚    โ”‚                                               โ”‚    โ”‚
    โ”‚    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚           PADDING                 โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    (Cushion around content) ๐Ÿงธ    โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚                                   โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ”‚                       โ”‚      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ”‚       CONTENT         โ”‚      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ”‚    (Your text/image)  โ”‚      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ”‚         ๐Ÿ“            โ”‚      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ”‚                       โ”‚      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ”‚                                   โ”‚      โ”‚    โ”‚
    โ”‚    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚    โ”‚
    โ”‚    โ”‚                                               โ”‚    โ”‚
    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    CSS CODE:
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  .box {                                                 โ”‚
    โ”‚      margin: 20px;     /* ๐ŸŒŒ Space outside */          โ”‚
    โ”‚      border: 2px solid black;  /* ๐Ÿ“ฆ The edge */       โ”‚
    โ”‚      padding: 15px;    /* ๐Ÿงธ Cushion inside */         โ”‚
    โ”‚      width: 200px;     /* โ†”๏ธ Content width */           โ”‚
    โ”‚  }                                                      โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ—บ๏ธ Visual: Flexbox Layout

    FLEXBOX - FLEXIBLE BOXES! ๐Ÿคธ

    flex-direction: row (default)
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”               โ”‚
    โ”‚    โ”‚  Box 1  โ”‚  โ”‚  Box 2  โ”‚  โ”‚  Box 3  โ”‚    โ†’โ†’โ†’        โ”‚
    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜               โ”‚
    โ”‚                                                         โ”‚
    โ”‚    Items flow LEFT to RIGHT like reading a book ๐Ÿ“–     โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    flex-direction: column
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                                  โ”‚
    โ”‚    โ”‚     Box 1       โ”‚  โ†“                               โ”‚
    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ†“                               โ”‚
    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ†“                               โ”‚
    โ”‚    โ”‚     Box 2       โ”‚  โ†“                               โ”‚
    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ†“                               โ”‚
    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ†“                               โ”‚
    โ”‚    โ”‚     Box 3       โ”‚                                  โ”‚
    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                                  โ”‚
    โ”‚                                                         โ”‚
    โ”‚    Items stack TOP to BOTTOM like a tower ๐Ÿ—ผ           โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    justify-content: space-between
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”              โ”Œโ”€โ”€โ”€โ”€โ”€โ”              โ”Œโ”€โ”€โ”€โ”€โ”€โ”      โ”‚
    โ”‚  โ”‚  1  โ”‚              โ”‚  2  โ”‚              โ”‚  3  โ”‚      โ”‚
    โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”˜              โ””โ”€โ”€โ”€โ”€โ”€โ”˜              โ””โ”€โ”€โ”€โ”€โ”€โ”˜      โ”‚
    โ”‚                                                         โ”‚
    โ”‚    Space is spread BETWEEN items evenly! โ†”๏ธ             โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ—บ๏ธ Visual: CSS Grid Layout

    CSS GRID - LIKE A SPREADSHEET! ๐Ÿ“Š

    grid-template-columns: 1fr 1fr 1fr (3 equal columns)

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚    Column 1      Column 2      Column 3                 โ”‚
    โ”‚    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                   โ”‚
    โ”‚    โ”‚          โ”‚          โ”‚          โ”‚                   โ”‚
    โ”‚    โ”‚  Cell 1  โ”‚  Cell 2  โ”‚  Cell 3  โ”‚  Row 1            โ”‚
    โ”‚    โ”‚          โ”‚          โ”‚          โ”‚                   โ”‚
    โ”‚    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค                   โ”‚
    โ”‚    โ”‚          โ”‚          โ”‚          โ”‚                   โ”‚
    โ”‚    โ”‚  Cell 4  โ”‚  Cell 5  โ”‚  Cell 6  โ”‚  Row 2            โ”‚
    โ”‚    โ”‚          โ”‚          โ”‚          โ”‚                   โ”‚
    โ”‚    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                   โ”‚
    โ”‚                                                         โ”‚
    โ”‚    Like a chocolate bar - neat rows and columns! ๐Ÿซ    โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    CSS CODE:
    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  .grid-container {                                      โ”‚
    โ”‚      display: grid;                                     โ”‚
    โ”‚      grid-template-columns: 1fr 1fr 1fr;               โ”‚
    โ”‚      gap: 10px;  /* Space between cells */             โ”‚
    โ”‚  }                                                      โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ“ Folder & File Map

Session16/
โ”œโ”€โ”€ README.md           โ† ๐Ÿ“– This lesson plan
โ”œโ”€โ”€ index.html          โ† ๐Ÿ  Your webpage structure
โ”œโ”€โ”€ styles.css          โ† ๐ŸŽจ Your styling rules
โ””โ”€โ”€ .gitignore          โ† ๐Ÿ™ˆ Files Git should ignore

โœ… Prerequisites

  • โœ… Completed Session 15 (Testing APIs)
  • โœ… A text editor (VS Code recommended)
  • โœ… A web browser (Chrome, Firefox, Edge)

๐Ÿ› ๏ธ Step-by-Step Build Guide

1๏ธโƒฃ Create Your Project Folder

๐Ÿ“‚ Create a new folder for your project:

mkdir library-frontend
cd library-frontend

2๏ธโƒฃ Create Your First HTML File

๐Ÿ“„ Create file: index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>๐Ÿ“š My Library</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <h1>Hello, World!</h1>
</body>
</html>

๐Ÿ” Understanding each part:

    LINE BY LINE ๐Ÿ“–

    <!DOCTYPE html>
    โ†‘ Tells the browser: "This is HTML5!"

    <html lang="en">
    โ†‘ The whole page starts here. lang="en" means English.

    <head>
    โ†‘ Invisible info - like the brain ๐Ÿง 

    <meta charset="UTF-8">
    โ†‘ "I can display emojis and special characters!"

    <meta name="viewport" ...>
    โ†‘ "Make me look good on phones too!"

    <title>๐Ÿ“š My Library</title>
    โ†‘ What shows in the browser tab

    <link rel="stylesheet" href="styles.css">
    โ†‘ "Connect my CSS styling file!"

    <body>
    โ†‘ Visible content starts here - like the body ๐Ÿ’ช

    <h1>Hello, World!</h1>
    โ†‘ A big heading!

3๏ธโƒฃ Open in Browser

๐ŸŒ Double-click index.html to open it in your browser!

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚ ๐Ÿ“š My Library               โ† โ”€ โ–ก โœ•                      โ”‚
    โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
    โ”‚                                                          โ”‚
    โ”‚   Hello, World!                                          โ”‚
    โ”‚                                                          โ”‚
    โ”‚                                                          โ”‚
    โ”‚                                                          โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽ‰ You made your first webpage!


4๏ธโƒฃ Add Semantic Structure

โœ๏ธ Update index.html with proper sections:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>๐Ÿ“š My Library</title>
    <link rel="stylesheet" href="styles.css">
</head>
<body>
    <!-- ๐ŸŽฉ Header - Top of page -->
    <header>
        <h1>๐Ÿ“š My Library</h1>
        <nav>
            <a href="#books">Books</a>
            <a href="#about">About</a>
            <a href="#contact">Contact</a>
        </nav>
    </header>

    <!-- โญ Main - Primary content -->
    <main>
        <section id="books">
            <h2>๐Ÿ“– Our Books</h2>
            <p>Welcome to our library! Browse our collection below.</p>
        </section>
    </main>

    <!-- ๐Ÿ‘Ÿ Footer - Bottom of page -->
    <footer>
        <p>&copy; 2026 My Library. Made with โค๏ธ at CoderDojo</p>
    </footer>
</body>
</html>

๐Ÿ” What are semantic elements?

    SEMANTIC = MEANINGFUL ๐Ÿ’ก

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚  NON-SEMANTIC          SEMANTIC                         โ”‚
    โ”‚  (Generic)             (Meaningful)                     โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€         โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                   โ”‚
    โ”‚                                                         โ”‚
    โ”‚  <div>                 <header>  ๐ŸŽฉ                     โ”‚
    โ”‚  <div>                 <nav>     ๐Ÿงญ                     โ”‚
    โ”‚  <div>                 <main>    โญ                     โ”‚
    โ”‚  <div>                 <section> ๐Ÿ“ฆ                     โ”‚
    โ”‚  <div>                 <article> ๐Ÿ“ฐ                     โ”‚
    โ”‚  <div>                 <aside>   ๐Ÿ“Ž                     โ”‚
    โ”‚  <div>                 <footer>  ๐Ÿ‘Ÿ                     โ”‚
    โ”‚                                                         โ”‚
    โ”‚  Semantic elements tell the browser (and humans!)       โ”‚
    โ”‚  WHAT the content IS, not just that it exists.          โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

5๏ธโƒฃ Create Your CSS File

๐Ÿ“„ Create file: styles.css

/* ๐ŸŽจ CSS Styles for My Library */

/* ๐ŸŒ Global styles - apply to everything */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ๐Ÿ’ช Body styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* ๐ŸŽฉ Header styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: center;
}

/* ๐Ÿงญ Navigation styles */
nav {
    margin-top: 10px;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
    padding: 5px 10px;
}

nav a:hover {
    background-color: #3498db;
    border-radius: 5px;
}

/* โญ Main content styles */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

/* ๐Ÿ“ฆ Section styles */
section {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ๐Ÿ‘Ÿ Footer styles */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 15px;
    position: fixed;
    bottom: 0;
    width: 100%;
}

๐Ÿ” CSS Selectors explained:

    CSS SELECTORS - HOW TO TARGET ELEMENTS ๐ŸŽฏ

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚  SELECTOR        TARGETS                EXAMPLE         โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€        โ”€โ”€โ”€โ”€โ”€โ”€โ”€                โ”€โ”€โ”€โ”€โ”€โ”€โ”€         โ”‚
    โ”‚                                                         โ”‚
    โ”‚  element         All of that type       h1 { }          โ”‚
    โ”‚                  "All headings"                         โ”‚
    โ”‚                                                         โ”‚
    โ”‚  .class          Elements with class    .card { }       โ”‚
    โ”‚                  "Things marked .card"                  โ”‚
    โ”‚                                                         โ”‚
    โ”‚  #id             One specific element   #hero { }       โ”‚
    โ”‚                  "The one called hero"                  โ”‚
    โ”‚                                                         โ”‚
    โ”‚  element element Nested elements        nav a { }       โ”‚
    โ”‚                  "Links inside nav"                     โ”‚
    โ”‚                                                         โ”‚
    โ”‚  :hover          When mouse is over     a:hover { }     โ”‚
    โ”‚                  "Links being hovered"                  โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

6๏ธโƒฃ Add Book Cards

โœ๏ธ Update your section in index.html:

<section id="books">
    <h2>๐Ÿ“– Our Books</h2>
    <p>Welcome to our library! Browse our collection below.</p>

    <!-- ๐Ÿ“š Book cards container -->
    <div class="book-grid">
        <!-- ๐Ÿ“• Book Card 1 -->
        <article class="book-card">
            <div class="book-cover">๐Ÿ“•</div>
            <h3>The Great Gatsby</h3>
            <p class="author">By F. Scott Fitzgerald</p>
            <p class="pages">180 pages</p>
            <span class="status available">Available</span>
            <button class="checkout-btn">Check Out</button>
        </article>

        <!-- ๐Ÿ“— Book Card 2 -->
        <article class="book-card">
            <div class="book-cover">๐Ÿ“—</div>
            <h3>To Kill a Mockingbird</h3>
            <p class="author">By Harper Lee</p>
            <p class="pages">281 pages</p>
            <span class="status available">Available</span>
            <button class="checkout-btn">Check Out</button>
        </article>

        <!-- ๐Ÿ“˜ Book Card 3 -->
        <article class="book-card">
            <div class="book-cover">๐Ÿ“˜</div>
            <h3>1984</h3>
            <p class="author">By George Orwell</p>
            <p class="pages">328 pages</p>
            <span class="status checked-out">Checked Out</span>
            <button class="checkout-btn" disabled>Unavailable</button>
        </article>

        <!-- ๐Ÿ“™ Book Card 4 -->
        <article class="book-card">
            <div class="book-cover">๐Ÿ“™</div>
            <h3>Pride and Prejudice</h3>
            <p class="author">By Jane Austen</p>
            <p class="pages">279 pages</p>
            <span class="status available">Available</span>
            <button class="checkout-btn">Check Out</button>
        </article>
    </div>
</section>

7๏ธโƒฃ Style the Book Cards with Flexbox

โœ๏ธ Add to styles.css:

/* ๐Ÿ“š Book Grid - Using CSS Grid! */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* ๐Ÿ“– Individual Book Card */
.book-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ๐Ÿ“• Book Cover Emoji */
.book-cover {
    font-size: 4rem;
    margin-bottom: 10px;
}

/* ๐Ÿ“ Book Title */
.book-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
}

/* โœ๏ธ Author */
.author {
    color: #666;
    font-style: italic;
    margin-bottom: 5px;
}

/* ๐Ÿ“„ Pages */
.pages {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

/* โœ… Status Badge */
.status {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.status.available {
    background-color: #d4edda;
    color: #155724;
}

.status.checked-out {
    background-color: #f8d7da;
    color: #721c24;
}

/* ๐Ÿ”˜ Checkout Button */
.checkout-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.checkout-btn:hover {
    background-color: #2980b9;
}

.checkout-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

8๏ธโƒฃ Make It Responsive with Media Queries

โœ๏ธ Add to the bottom of styles.css:

/* ๐Ÿ“ฑ Responsive Design - Media Queries */

/* Tablets and smaller desktops */
@media (max-width: 768px) {
    header {
        padding: 15px;
    }

    nav a {
        display: block;
        margin: 5px 0;
    }

    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    footer {
        position: static;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    header h1 {
        font-size: 1.5rem;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .book-card {
        padding: 15px;
    }

    main {
        padding: 10px;
        margin-bottom: 0;
    }
}

๐Ÿ” How media queries work:

    RESPONSIVE DESIGN ๐Ÿ“ฑ๐Ÿ’ป๐Ÿ–ฅ๏ธ

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚  @media (max-width: 768px) { ... }                     โ”‚
    โ”‚                                                         โ”‚
    โ”‚  โ†‘ "When the screen is 768px or smaller,               โ”‚
    โ”‚     use these special styles"                           โ”‚
    โ”‚                                                         โ”‚
    โ”‚  SCREEN SIZE BREAKDOWN:                                 โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐Ÿ–ฅ๏ธ Desktop     >1024px    Full layout, multiple cols  โ”‚
    โ”‚  ๐Ÿ’ป Tablet      768-1024px  Adjusted layout            โ”‚
    โ”‚  ๐Ÿ“ฑ Mobile      <768px      Single column, stacked     โ”‚
    โ”‚                                                         โ”‚
    โ”‚  The page ADAPTS to fit any device! ๐ŸŽฏ                 โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

9๏ธโƒฃ Add More HTML Elements

โœ๏ธ Add a search bar above your book grid:

<!-- ๐Ÿ” Search and Filter Section -->
<div class="search-bar">
    <input type="text" id="search" placeholder="๐Ÿ” Search books...">
    <select id="filter">
        <option value="all">All Books</option>
        <option value="available">Available Only</option>
        <option value="checked-out">Checked Out</option>
    </select>
</div>

โœ๏ธ Add styling for the search bar:

/* ๐Ÿ” Search Bar */
.search-bar {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.search-bar input:focus {
    border-color: #3498db;
    outline: none;
}

.search-bar select {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
    cursor: pointer;
}

๐Ÿ”Ÿ Commit Your Work

git init
git add .
git commit -m "Create HTML & CSS library interface"

๐Ÿ“Š Visual: Common CSS Properties

    CSS PROPERTIES CHEAT SHEET ๐Ÿ“‹

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  TEXT PROPERTIES โœ๏ธ                                     โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                      โ”‚
    โ”‚  color: #333;              Text color                   โ”‚
    โ”‚  font-size: 16px;          Text size                    โ”‚
    โ”‚  font-family: Arial;       Font type                    โ”‚
    โ”‚  font-weight: bold;        Bold text                    โ”‚
    โ”‚  text-align: center;       Alignment                    โ”‚
    โ”‚  text-decoration: none;    Remove underline             โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  BOX PROPERTIES ๐Ÿ“ฆ                                      โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                        โ”‚
    โ”‚  width: 200px;             Width                        โ”‚
    โ”‚  height: 100px;            Height                       โ”‚
    โ”‚  margin: 10px;             Space outside                โ”‚
    โ”‚  padding: 15px;            Space inside                 โ”‚
    โ”‚  border: 1px solid #ccc;   Border                       โ”‚
    โ”‚  border-radius: 10px;      Rounded corners              โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  BACKGROUND ๐ŸŽจ                                          โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                           โ”‚
    โ”‚  background-color: #fff;   Solid color                  โ”‚
    โ”‚  background-image: url();  Image                        โ”‚
    โ”‚  box-shadow: 0 2px 5px;    Drop shadow                  โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚  LAYOUT ๐Ÿ—๏ธ                                              โ”‚
    โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                                               โ”‚
    โ”‚  display: flex;            Flexbox container            โ”‚
    โ”‚  display: grid;            Grid container               โ”‚
    โ”‚  position: relative;       Positioning                  โ”‚
    โ”‚  gap: 10px;                Space between items          โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ’ฌ Group Reflection (5 minutes)

๐Ÿ”„ Circle Share - Answer one:

  1. "HTML is like ___ because..."
  2. "The box model reminded me of..."
  3. "Flexbox/Grid makes it easy to..."
  4. "One CSS property I want to experiment with is..."

โœ… Run & Test Checklist

  • ๐Ÿ“„ HTML file has proper structure (doctype, html, head, body)
  • ๐Ÿท๏ธ Used semantic elements (header, main, section, footer)
  • ๐ŸŽจ CSS file is linked and working
  • ๐Ÿ“ฆ Box model is understood (margin, border, padding, content)
  • ๐Ÿ“š Book cards display in a grid
  • ๐Ÿ–ฑ๏ธ Hover effects work on cards and buttons
  • ๐Ÿ“ฑ Page looks good on mobile (resize browser to test)
  • โœ… All navigation links work

๐Ÿš€ Bonus Challenges

โญ Challenge 1: Add More Books (Elementary)

Add 4 more book cards with different titles and authors.

โญโญ Challenge 2: Create a Book Detail Page (Middle School)

Create a new book-detail.html page that shows more info about one book:

  • Full description
  • Publication year
  • Genre
  • Reviews

โญโญโญ Challenge 3: CSS Animations (High School)

Add CSS animations:

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.book-card {
    animation: fadeIn 0.5s ease-out;
}

โญโญโญ Challenge 4: CSS Variables (High School)

Use CSS custom properties for theming:

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
}

header {
    background-color: var(--primary-color);
}

๐Ÿ“– Vocabulary Wall

Term ๐Ÿ“ Kid-Friendly Definition ๐Ÿ’ป Example
๐Ÿท๏ธ HTML Language that structures web pages <h1>Hello</h1>
๐ŸŽจ CSS Language that styles web pages color: blue;
๐Ÿ“ฆ Element A piece of content with tags <p>Text</p>
๐Ÿท๏ธ Tag Markers that define elements <h1> and </h1>
โœจ Attribute Extra info added to elements <a href="...">
๐ŸŽฏ Selector Targets elements to style h1, .class, #id
๐Ÿ“ฆ Box Model Content + Padding + Border + Margin Every element is a box!
๐Ÿคธ Flexbox Layout system for flexible boxes display: flex;
๐Ÿ“Š Grid Layout system for rows & columns display: grid;
๐Ÿ“ฑ Responsive Adapts to different screen sizes @media (max-width:)

๐Ÿ  Take-Home Connection

๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง Talk to a family member:

"Today I learned HTML and CSS! HTML is like the skeleton of a webpage - it creates the structure. CSS is like the clothes and makeup - it makes things look pretty! Every website you visit uses these languages."

๐ŸŒ Real-world examples:

  • ๐Ÿ›’ Amazon uses HTML to list products
  • ๐Ÿ“˜ Facebook uses CSS for its blue color scheme
  • ๐ŸŽฎ Video game websites use CSS animations
  • ๐Ÿ“ฐ News sites use CSS Grid for article layouts

๐Ÿ“ Activity: Open any website and right-click โ†’ "Inspect" to see the HTML and CSS! Try changing some colors and see what happens. (Don't worry, you can't break it - refresh to reset!)


๐ŸŽ‰ You Did It!

    YOUR FIRST WEBPAGE! ๐Ÿ†

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚                                                         โ”‚
    โ”‚  You learned:                                           โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐Ÿ“„ HTML Structure                                      โ”‚
    โ”‚     doctype, html, head, body                          โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐Ÿท๏ธ Semantic Elements                                   โ”‚
    โ”‚     header, main, section, article, footer             โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐ŸŽจ CSS Styling                                         โ”‚
    โ”‚     Colors, fonts, spacing, borders                    โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐Ÿ“ฆ Box Model                                           โ”‚
    โ”‚     Content, padding, border, margin                   โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐Ÿ—๏ธ Modern Layouts                                      โ”‚
    โ”‚     Flexbox and CSS Grid                               โ”‚
    โ”‚                                                         โ”‚
    โ”‚  ๐Ÿ“ฑ Responsive Design                                   โ”‚
    โ”‚     Media queries for mobile                           โ”‚
    โ”‚                                                         โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿ”ฎ What's Next!

    SESSIONS 17-18: COMING UP! ๐Ÿš€

    ๐ŸŽฏ Session 17: JavaScript Basics
    โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    โ€ข Make your page interactive!
    โ€ข Handle button clicks
    โ€ข Change content dynamically

    ๐Ÿ”— Session 18: Connecting to APIs
    โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
    โ€ข Fetch data from YOUR Library API
    โ€ข Display real books
    โ€ข Build a complete web app!

    Your webpage is about to come ALIVE! ๐ŸŽ‰

Keep building! ๐Ÿ—๏ธ

About

Session 16: HTML & CSS Foundations ๐ŸŽจ

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages