HTML Boilerplate - Guided Notes

CSCI 4513 - Web Programming | Class 4

Name: _________________________________ Date: _____________

📚 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?

📁 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:

  1. Tells the browser which _________________ of HTML to use
  2. For HTML5, we use: _________________
  3. 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:

  1. _________________________________________
  2. _________________________________________
  3. _________________________________________
  4. _________________________________________
⚠️ Remember: Nothing in the HEAD is _________________ on the page!

🌍 Character Encoding

<meta charset="_________">

Why UTF-8?

Without UTF-8: Café might display as _________________

🏷️ The TITLE Element

<title>_________________________</title>

Where Does the Title Appear?

List 4 places:

  1. _________________
  2. _________________
  3. _________________
  4. _________________

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:

  1. _________________
  2. _________________
  3. _________________
  4. _________________
  5. _________________

🎯 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?

  1. _________________________________________
  2. _________________________________________
  3. _________________________________________

⚠️ Common Boilerplate Mistakes

Check the mistakes you want to avoid:

💪 Practice Exercise

Write the Complete Boilerplate from Memory:

Use the space below to practice writing the complete HTML boilerplate structure:
















Self-Check Questions:

  1. Did you include the DOCTYPE? ☐
  2. Is your HTML element the root with lang attribute? ☐
  3. Does your HEAD come before BODY? ☐
  4. Did you include charset UTF-8? ☐
  5. Did you add a title? ☐
  6. Are all tags properly closed? ☐

📝 Homework Assignment

Part 1: Video & Practice

Video Title: _________________________________________

Part 2: Validation

Part 3: Peer Review

📝 Additional Notes

Use this space for any additional notes, questions, or observations during the lecture: