๐Ÿ“˜ Class 2 โ€” Diving into HTML

Topic 1 ยท HTML Fundamentals โ€” 3 hours ยท Recap, page structure, lists, and images

Part 1 ยท Recap & New Tags

We started by reviewing the tags from Class 1 โ€” <h1>, <h2>, <h3>, and <a>. Then we added a handful of text-formatting tags that handle small but essential jobs.

New HTML Tags

๐Ÿ’ก Check in: Does this make sense? Try each tag yourself in VS Code before moving on. Pause if you need to.

Part 2 ยท HTML Page Setup

Every HTML page follows the same skeleton. Once you know the structure, every site you build starts the same way.

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>

</body>
</html>

What each piece does

Semantic structural tags

๐Ÿ›  Activity: Build a webpage using everything you've learned โ€” heading tags, paragraph tag, anchor tag, <strong>, and other text-adjusting tags. Use your reference sheet. Screen-share and show the class when you're done.

Lists

Two ways to list things:

<ul>
  <li>First item</li>
  <li>Second item</li>
</ul>

Part 3 ยท Images

To put an image on a page, use the <img> tag. It's self-closing โ€” no </img>.

<img src="path/to/your/image.jpg" alt="Description of the image">
๐Ÿ“ Folder discipline: Create an images folder inside your project. Keep all your images in there. Never reference an image that lives on someone else's computer or random web URL โ€” copy it into your project first.

Sizing an image

If an image doesn't fit, use the style attribute for quick adjustments:

<img src="images/hero.jpg" alt="Hero photo" style="width: 400px;">

Background images

To set a background image on the whole page, use a style attribute on the <body> tag (we'll move this into CSS files later):

<body style="background-image: url('images/background.jpg'); background-size: cover;">

Quick Recap Checklist

๐Ÿ”— References

W3Schools HTML

MDN HTML Element Index

Tag Reference Sheet (PDF)

FrontEndClass2 sample code (ZIP)


Class 2 โ€” Equinim College ยท Front End Web Development ยท 26B