📚 Today's Goal: Master the HTML boilerplate structure and understand each component's purpose!
🏗️ What is HTML Boilerplate?
HTML boilerplate is the _________________ structure that every HTML document needs.
Think of it like the _________________ of your webpage - it provides the basic framework.
Why is Boilerplate Important?
- Tells browsers how to _________________ your content
- Ensures proper _________________ across different browsers
- Sets up important _________________ for search engines
- Improves _________________ for screen readers
📁 Creating HTML Files
File Extension: HTML files must end with _________
Homepage Name: Always name your homepage _________________
💡 Why index.html? Web servers automatically look for this file when users visit your website!
📜 The DOCTYPE Declaration
The DOCTYPE must be the _________________ line of every HTML document!
<_________ html>
Purpose of DOCTYPE:
- Tells the browser which _________________ of HTML to use
- For HTML5, we use: _________________
- Must appear _________________ the <html> tag
⚠️ Common Mistake: Forgetting the DOCTYPE can cause rendering issues!
🏠 The HTML Element
The <html> element is the _________________ element of the document.
<html _________="en">
<!-- All other elements go here -->
</html>
The lang Attribute
Purpose |
Your Notes |
Specifies language of content |
_________________________________________ |
Helps screen readers |
_________________________________________ |
Improves SEO |
_________________________________________ |
🧠 The HEAD Element
The HEAD contains _________________ about the webpage.
<head>
<meta _________="UTF-8">
<_________>Page Title</_________>
</head>
What Goes in the HEAD?
List 4 things that can go in the HEAD element:
- _________________________________________
- _________________________________________
- _________________________________________
- _________________________________________
⚠️ Remember: Nothing in the HEAD is _________________ on the page!
🌍 Character Encoding
<meta charset="_________">
Why UTF-8?
- Supports characters from _________________ languages
- Handles special symbols like: _________________
- Standard encoding for the _________________
Without UTF-8: Café might display as _________________
🏷️ The TITLE Element
<title>_________________________</title>
Where Does the Title Appear?
List 4 places:
- _________________
- _________________
- _________________
- _________________
No title? Browser shows _________________ instead!
👁️ The BODY Element
The BODY contains all _________________ content.
<_________>
<h1>Hello World!</h1>
<!-- All visible content goes here -->
</_________>
What Can Go in the BODY?
List 5 types of content:
- _________________
- _________________
- _________________
- _________________
- _________________
🎯 Complete HTML Boilerplate
Fill in the complete boilerplate structure:
_______________
_______________ lang="_____">
_______________
<meta _______________="UTF-8">
<_______________>My First Webpage</_______________>
_______________
_______________
<h1>Hello World!</h1>
_______________
_______________
🌐 Opening HTML in Browser
Three Methods:
Method |
How to Do It |
Drag & Drop |
_________________________________________ |
Double Click |
_________________________________________ |
Terminal/Command Line |
_________________________________________ |
Refresh Shortcut: Windows: _________ | Mac: _________
✨ VS Code Shortcut
Type _____ and press _________ to generate boilerplate instantly!
⚠️ Important: Don't rely on this shortcut while learning! Build muscle memory by typing it manually.
✅ HTML Validation
W3C Validator Website: _________________________________________
Why Validate Your HTML?
- _________________________________________
- _________________________________________
- _________________________________________
⚠️ Common Boilerplate Mistakes
Check the mistakes you want to avoid:
- ☐ Forgetting the _________________
- ☐ Missing _________________ tags
- ☐ Wrong order (body before _________________)
- ☐ Missing _________________ attribute
- ☐ Forgetting charset _________________ tag
- ☐ Content in the _________________ section
- ☐ Missing _________________ element
💪 Practice Exercise
Write the Complete Boilerplate from Memory:
Use the space below to practice writing the complete HTML boilerplate structure:
Self-Check Questions:
- Did you include the DOCTYPE? ☐
- Is your HTML element the root with lang attribute? ☐
- Does your HEAD come before BODY? ☐
- Did you include charset UTF-8? ☐
- Did you add a title? ☐
- Are all tags properly closed? ☐
📝 Homework Assignment
Part 1: Video & Practice
Video Title: _________________________________________
Part 2: Validation
- Run your HTML through: _________________________________________
- Submit screenshot to: _________________________________________
Part 3: Peer Review
- Respond to _____ other student posts
- Compare and _________________ their results with yours
📝 Additional Notes
Use this space for any additional notes, questions, or observations during the lecture: