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
| ๐ง 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 |
๐ฌ 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!"
๐ฆ 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!"
๐ 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" ๐ฆ
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
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 */ โ
โ } โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
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! โ๏ธ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
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 */ โ
โ } โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Session16/
โโโ README.md โ ๐ This lesson plan
โโโ index.html โ ๐ Your webpage structure
โโโ styles.css โ ๐จ Your styling rules
โโโ .gitignore โ ๐ Files Git should ignore
- โ Completed Session 15 (Testing APIs)
- โ A text editor (VS Code recommended)
- โ A web browser (Chrome, Firefox, Edge)
๐ Create a new folder for your project:
mkdir library-frontend
cd library-frontend๐ 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!
๐ Double-click index.html to open it in your browser!
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ ๐ My Library โ โ โก โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ Hello, World! โ
โ โ
โ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ You made your first webpage!
โ๏ธ 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>© 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. โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ 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" โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ๏ธ 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>โ๏ธ 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;
}โ๏ธ 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! ๐ฏ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ๏ธ 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;
}git init
git add .
git commit -m "Create HTML & CSS library interface" 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 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
๐ Circle Share - Answer one:
- "HTML is like ___ because..."
- "The box model reminded me of..."
- "Flexbox/Grid makes it easy to..."
- "One CSS property I want to experiment with is..."
- ๐ 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
Add 4 more book cards with different titles and authors.
Create a new book-detail.html page that shows more info about one book:
- Full description
- Publication year
- Genre
- Reviews
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;
}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);
}| 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:) |
๐จโ๐ฉโ๐ง 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!)
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 โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
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! ๐๏ธ