Web Development 1 – Study Guide

HTML Basics

HTML is the structure of the web. Use semantic tags so the browser and screen readers understand your layout.

Minimal HTML template
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Page</title>
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <header>...</header>
  <main>...</main>
  <footer>...</footer>
</body>
</html>

Common Tags

TagPurposeNotes
<a>Link to pages or sectionsUse href and target carefully
<img>Embed imagesAlways include descriptive alt
<ul>/<ol><li>ListsUse ordered lists for steps
<table>Tabular dataAlways include <th> headings

CSS Fundamentals

CSS controls presentation: color, spacing, typography, and layout. Link your CSS with <link rel="stylesheet" href="style.css">.

PropertyDescriptionExample
colorText colorcolor: #005faf;
backgroundBackground paintbackground: #f5f7fb;
marginOutside spacingmargin: 1rem;
paddingInside spacingpadding: 1rem;
border-radiusRounded cornersborder-radius: 12px;
box-shadowShadow behind boxesbox-shadow: 0 2px 8px rgba(0,0,0,.1);

Example: Button styles

.btn {
  display: inline-block;
  padding: .6rem 1rem;
  border: 1px solid #005faf;
  border-radius: 8px;
  text-decoration: none;
}
.btn--primary { background: #005faf; color: #fff; }
.btn--ghost   { background: transparent; color: #005faf; }

Midterm Tips

  1. Know how to link CSS and use selectors.
  2. Write semantic HTML with proper nesting.
  3. Build at least one table and one list from scratch.
  4. Use a consistent color palette and spacing scale.
  5. Validate HTML on W3C and scan CSS quickly for typos.

Cheat‑Sheet (Quick Reference)

Box model illustration
CSS box model: margin → border → padding → content

Box Model

  • margin: outer space
  • border: line around the box
  • padding: inner space
  • content: actual element content

Flex Layout

.row {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}