Phase 1 ยท HTML & CSS
HU EN
Phase 1 ยท Lesson 1

Our Code Editor โ€” Visual Studio Code

Before we write a single line, we need the right tool. Our choice is VS Code โ€” free, supports every programming language, and is one of the most widely used code editors in the world.

โฑ 30 min
๐Ÿ›  Setup
๐Ÿ†“ Completely free
๐ŸŽฏ Goal: open your first HTML file

1What is a code editor and why do we need one?

Technically you can write HTML in Windows Notepad โ€” but that's like performing surgery with a hammer. It's possible, but much harder and more error-prone. A code editor helps prevent mistakes, lets you work faster, and makes it immediately clear what is what in the code.

What a code editor does that Notepad doesn't

Syntax highlighting โ€” HTML tags appear in red, JS keywords in purple, strings in green. The structure is visible at a glance.

Auto-completion โ€” start typing <div and it suggests the closing </div>.

Error highlighting โ€” red underlines show typos before you even try to run the code.

Find and replace โ€” finds and replaces every occurrence of a word across the entire project at once.

2Why VS Code โ€” a comparison

EditorPriceLanguagesExtensibilityLearning curve
VS Code โœ“Free100+Thousands of extensionsMedium โ€” 1โ€“2 days
Notepad++FreeManyLimitedVery easy
Sublime Text~$80ManyMediumEasy
WebStorm~$70/yearWeb-focusedBuilt-inHarder
Notepad (Windows)FreeNo highlightingNoneInstant
Our choice

VS Code is the best balance: completely free, but professional grade. This is what Google, Microsoft and Netflix developers use. Learn it now and this knowledge will serve you for decades.

3Installation โ€” step by step

Download address

https://code.visualstudio.com
Windows, Mac and Linux versions are all available here. Choose the one that matches your operating system.

Installation steps โ€” WindowsSETUP
1. Go to: https://code.visualstudio.com
2. Click the big blue "Download for Windows" button
3. Run the downloaded VSCodeSetup-x64-*.exe file
4. During installation, keep these boxes checked:
   โœ“ "Add to PATH"               โ† important!
   โœ“ "Register Code as editor for supported file types"
   โœ“ "Add 'Open with Code' action to Windows Explorer"
5. After installation, launch VS Code
6. The welcome screen opens โ€” you're ready!

First launch โ€” what you'll see

A welcome screen appears on first launch. You can close it. The most important areas:

Explorer (Ctrl+Shift+E)

On the left โ€” your files and folder tree. This is where you open HTML files.

Editor (centre area)

This is where you write code. Multiple files can be open at once as tabs.

Terminal (Ctrl+`)

Built-in command line. Not needed yet, but useful later.

Extensions (Ctrl+Shift+X)

Where you install extensions. Go here for Live Server.

4Essential extension: Live Server

Live Server is the most important extension for this course. Without it you need to press F5 to refresh the browser after every save โ€” with it the browser refreshes automatically the moment you save.

Installing Live ServerEXTENSION
1. In VS Code press Ctrl+Shift+X (Extensions panel)
2. Type in the search box: "Live Server"
3. Find "Live Server" โ€” by Ritwick Dey
4. Click the "Install" button
5. After installing, the status bar shows:
   "Go Live"  โ† click this to start serving

Usage:
- Open an HTML file
- Click "Go Live" (bottom right corner)
- Browser opens automatically: http://127.0.0.1:5500
- Every save (Ctrl+S) triggers an instant refresh!
Recommended extensions (optional but useful)

Prettier โ€” automatically formats your code on save
Auto Rename Tag โ€” rename the opening tag and the closing tag updates too
Color Highlight โ€” shows the actual colour next to codes like #ff0000

5Most useful keyboard shortcuts

ShortcutWhat it doesWhen it's useful
Ctrl + SSaveAfter every change โ€” Live Server watches for it
Ctrl + ZUndoWhen you made a mistake
Ctrl + /Toggle commentQuickly comment out a line
Alt + โ†‘โ†“Move lineRearrange code without copy-paste
Ctrl + DSelect next matchEdit multiple occurrences at once
Ctrl + FFind in fileLocate a tag or variable
Ctrl + Shift + FFind in all filesProject-wide search
F12Go to definitionJump to where a function or variable is defined
Ctrl + `Open terminalCommand line inside VS Code
Shift + Alt + FFormat documentInstantly tidy up messy code

6Opening Castle Siege in VS Code

Let's try it for real! Open the castle_siege.html file in VS Code and see how the code appears.

First open โ€” stepsPRACTICE
1. In VS Code: File โ†’ Open Folder (not File โ†’ Open File!)
   โ†’ Select the folder where the games are stored
   โ†’ All files appear in the left panel

2. Click "castle_siege.html" in the left panel
   โ†’ It opens in the editor
   โ†’ Can you see syntax highlighting? Red tags, yellow attributes?

3. Click "Go Live" (bottom right corner)
   โ†’ Opens in the browser and is playable!

4. Try it: find the <title> tag (Ctrl+F โ†’ "title")
   โ†’ Change its text
   โ†’ Save (Ctrl+S) โ†’ watch the browser tab!
What you'll see in the code

Castle Siege is nearly 900 lines of code. That may look daunting at first โ€” but by the end of the course you'll understand every single line. In the first lessons we only look at the first 15 lines.

โœ๏ธ Lesson 1 Task โ€” VS Code first steps

Install VS Code and complete these tasks:

  • Install VS Code from code.visualstudio.com
  • Install the Live Server extension (by Ritwick Dey)
  • Open the games folder (File โ†’ Open Folder)
  • Open castle_siege.html โ€” can you see the syntax highlighting?
  • Launch with Live Server (Go Live button) โ€” does the game run in the browser?
  • Find the <title> tag (Ctrl+F), change its text, save (Ctrl+S) โ€” did the tab title change?

๐Ÿง  Which statement about VS Code is true?

It's paid software with a 30-day trial
It only supports HTML and CSS editing
It's free and supports 100+ programming languages via extensions
Live Server is automatically installed with VS Code
Phase 1 ยท Lesson 2

The HTML Document Structure

We learn the "skeleton" of a webpage โ€” the frame that holds everything else. We'll see how this same structure looks in the Castle Siege game.

โฑ 45โ€“60 min
๐Ÿ“ HTML
๐ŸŽฎ Castle Siege example
๐ŸŽฏ Goal: your first HTML file

1What is HTML?

HTML (HyperText Markup Language) is not a programming language โ€” it's a markup language. We use it to say what is on the webpage and what each thing is. Our job is not to give instructions to the machine, but to give structure to content.

Analogy

HTML is like a building's floor plan. It shows where the door, windows and walls are โ€” but doesn't say what colour they should be. Colours are CSS's job, and movement (who opens the door) is JavaScript's.

HTML is made of tags (markers). Every tag has an opening and a closing version:

example.htmlHTML
<h1>This is a heading</h1>
<!--  โ†‘ opening tag     โ†‘ closing tag (starts with a slash) -->

<p>This is a paragraph.</p>

<!-- Some tags are self-closing (they have no content): -->
<br>    <!-- line break -->
<img src="image.jpg">  <!-- image -->

2The basic document structure

Every HTML file must start like this. It's not optional โ€” this is what the browser expects:

index.html โ€” the basic skeletonHTML
<!DOCTYPE html>                    <!-- 1. This is an HTML5 document -->
<html lang="en">                    <!-- 2. The page language -->

  <head>                             <!-- 3. Head (not visible) -->
    <meta charset="UTF-8">          <!-- special chars work -->
    <meta name="viewport"
          content="width=device-width">  <!-- mobile view -->
    <title>Page Title</title>         <!-- browser tab -->
    <style>
      /* CSS goes here */
    </style>
  </head>

  <body>                             <!-- 4. Body (this is visible) -->
    <h1>Hello World!</h1>
    <script>
      // JavaScript goes here
    </script>
  </body>

</html>

We see exactly this in Castle Siege

Open castle_siege.html in a text editor โ€” its first 10 lines are exactly this structure, just with a different title and content:

castle_siege.html โ€” the real file's openingHTML
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Castle Siege โ€“ 50 Levels</title>
  <style>
    /* ... all the styles live here ... */
  </style>
</head>
<body>
  <canvas id="c"></canvas>   <!-- the game canvas -->
  <div id="hud">...</div>    <!-- speed buttons -->
  <script>
    // ... all the JavaScript lives here ...
  </script>
</body>
</html>
Key observation

Castle Siege's <body> contains just 3 things: a <canvas>, a <div>, and a <script>. 99% of the game lives inside the script โ€” but the HTML frame is always the same.

3The four main elements explained

ElementWhat it doesWhere you see it in the game
<!DOCTYPE html>Tells the browser this is HTML5 โ€” mandatory first lineCastle Siege, Froggy Rush, Turtle Race โ€” always the very first line
<html lang="en">Root of the whole document; the lang attribute helps screen readers and search enginesAll our games have lang="en" (or the original Hungarian)
<head>Meta-data, title, styles โ€” the user does NOT see this directlyCastle Siege's <head> contains all CSS styles (300+ lines)
<body>Visible content โ€” what appears in the browserFroggy Rush's body contains the canvas, D-pad buttons and modal window

4Comments in the code

Comments are only for the code reader โ€” the browser ignores them completely. They're very important so you can understand your own code later.

comments in HTMLHTML
<!-- This is a single-line HTML comment -->

<!--
  This is a
  multi-line comment
-->

<canvas id="c"></canvas>  <!-- the game canvas, controlled by JavaScript -->
โœ๏ธ Lesson 2 Task

Create your very first HTML file! Open a text editor, create a file called mypage.html, and type in the basic structure.

  • Include the correct DOCTYPE, html, head, body structure
  • Set the title to "My First Page"
  • Inside the body write your name in an h1 tag
  • Add a comment explaining what the h1 does
  • After saving, double-click to open in the browser โ€” does your name appear?

๐Ÿง  Quick check โ€” which statement is true?

The <head> content is displayed in the browser
The DOCTYPE is optional and can be left out
The <body> contains the visible elements
Comments affect how the page is displayed
Phase 1 ยท Lesson 3

Text, Headings, Lists

We learn how to display text โ€” and how this looks in our games' interfaces.

โฑ 45 min
๐Ÿ“ HTML
๐ŸŽฎ Froggy Rush panel

1Headings โ€” h1 to h6

HTML has 6 levels of heading. <h1> is the most important (largest), <h6> is the smallest. A page should only have one <h1>!

headings.htmlHTML
<h1>๐Ÿธ Froggy Rush!</h1>          <!-- largest -->
<h2>Current Level</h2>
<h3>Statistics</h3>
<h4>Controls</h4>              <!-- rarely used -->
<h5>Footer note</h5>            <!-- even rarer -->
<h6>Legal text</h6>             <!-- smallest -->
Game example

In Froggy Rush: <h1>๐Ÿธ FROGGY RUSH!</h1> โ€” this is exactly what you see above the game. The browser renders it large and bold automatically.

Paragraphs and text formatting

text.htmlHTML
<p>This is a paragraph. It can contain multiple sentences.</p>

<p>This is <strong>bold</strong> text โ€” for important emphasis.</p>
<p>This is <em>italic</em> text โ€” for subtle stress.</p>

<br>   <!-- line break (self-closing, no </br>) -->
<hr>   <!-- horizontal dividing line -->
<code>Math.floor(Math.random() * 10)</code> <!-- inline code -->

Lists

lists.htmlHTML
<!-- Unordered list โ€” with bullet points -->
<ul>
  <li>Froggy Rush</li>
  <li>Turtle Race</li>
  <li>Castle Siege</li>
</ul>

<!-- Ordered list โ€” with numbers -->
<ol>
  <li>Open in browser</li>
  <li>Use arrow keys to steer</li>
  <li>Collect the eggs</li>
</ol>
When to use which?

<ul> โ€” when order doesn't matter (e.g. listing game rules)
<ol> โ€” when order matters (e.g. steps in sequence)

โœ๏ธ Lesson 3 Task

Expand your previous file with text content!

  • Add an h2 subheading: "My Favourite Games"
  • Below it, a ul list with the three games
  • In a paragraph, briefly write why you enjoy games โ€” highlight one word with strong
  • Add an ol list: how to launch Froggy Rush (3 steps)

๐Ÿง  Which list element has the correct syntax?

<list><item>Item</item></list>
<ul><li>Item</li></ul>
<ul><list>Item</list></ul>
<ol><item>Item</ul>
Phase 1 ยท Lesson 4

Links and Images

Linking is the essence of the web. We learn how to connect pages โ€” and how to display images. The links on our game portal are all built this way.

โฑ 45 min
๐Ÿ“ HTML
๐ŸŽฎ Game portal links

1Links โ€” <a> tag

links.htmlHTML
<!-- External link โ€” to another website -->
<a href="https://netlify.com">Netlify website</a>

<!-- Internal link โ€” to your own file -->
<a href="castle_siege.html">Castle Siege game</a>

<!-- Opens in a new tab -->
<a href="froggy_rush.html" target="_blank">Froggy Rush</a>

<!-- Jump within the same page (anchor) -->
<a href="#l2">Jump to Lesson 2</a>
<!-- ... then somewhere on the page: -->
<h2 id="l2">Lesson 2</h2>

Images โ€” <img> tag

images.htmlHTML
<!-- Basic image -->
<img src="frog.png" alt="A green frog">

<!-- With dimensions -->
<img src="turtle.png" alt="Turtle character"
     width="200" height="150">

<!-- Image as a link -->
<a href="turtle_race.html">
  <img src="preview.png" alt="Turtle Race">
</a>
The alt attribute is required!

The alt text is displayed if the image fails to load โ€” and it's what screen readers read aloud for visually impaired users. Always give a meaningful alt text.

โœ๏ธ Lesson 4 Task โ€” Game portal page

Build the foundation of your own game portal! In one HTML file:

  • h1 heading: "My Games"
  • Three links to the three games (castle_siege.html, froggy_rush.html, turtle_race.html)
  • Each link should have target="_blank" (opens in new tab)
  • Create a "contact" anchor at the bottom of the page and link to it from the top

๐Ÿง  Which attribute opens a link in a new browser tab?

href="_new"
target="_blank"
open="new"
link="tab"
Phase 1 ยท Lesson 5

div, span, id and class

The "boxes" of HTML โ€” we use these to group elements together. Every panel in Castle Siege and Froggy Rush is built on exactly this.

โฑ 60 min
๐Ÿ“ HTML + CSS
๐ŸŽฎ Castle Siege HUD

1div โ€” block-level container

The <div> (division) is an invisible box that groups elements together. On its own it does nothing โ€” but combined with CSS and JavaScript it's one of the most important tools in web development.

castle_siege.html โ€” the HUD panel divsHTML
<!-- A panel for the speed-change buttons -->
<div id="hud">
  <span>Speed:</span>

  <!-- Each button is a button element inside the div -->
  <button class="sb on" id="s0">๐ŸŒ Child</button>
  <button class="sb"    id="s1">๐Ÿข Slow</button>
  <button class="sb"    id="s2">โš”๏ธ Normal</button>
</div>

id vs class โ€” what's the difference?

Propertyidclass
UniquenessCan appear only once per pageCan be used on multiple elements
CSS syntax#hud { ... }.sb { ... }
JS syntaxgetElementById('hud')getElementsByClassName('sb')
When to useTo identify a unique element (canvas, modal)For reusable styles (buttons, cards)
In Castle Siege for example

id="hud" is unique โ€” there's only one HUD on the entire page.
class="sb" (speed button) appears on 4 buttons โ€” they all share the same style.

span โ€” inline-level container

span_example.htmlHTML
<!-- div: starts a new line (block element) -->
<div>This is a block โ€” takes up the full line.</div>
<div>This goes on the next line.</div>

<!-- span: stays inline (inline element) -->
<p>Score: <span id="ui-score">0</span> points.</p>
<!-- The span only wraps the "0", the paragraph stays continuous -->

<!-- Froggy Rush also displays the score this way: -->
<div class="pbox">
  <div class="plabel">Score</div>
  <div class="pval" id="ui-score">0</div>
</div>
โœ๏ธ Lesson 5 Task

Build your game portal's panel structure using divs!

  • Create an id="header" div for the title and navigation
  • Create an id="games" div containing 3 divs each with class="game-card"
  • Each card should contain: h3 (game name), p (short description), a (link to game)
  • Create an id="footer" div at the bottom of the page

๐Ÿง  What's the difference between id and class?

No difference, they're interchangeable
id is for styling, class is for identification
id can only appear once per page; class can be used on multiple elements
class is only for CSS, id is only for JavaScript
Phase 1 ยท Lesson 6

Buttons and Input Elements

Castle Siege's save system, its speed buttons and its modal window all have HTML inputs. Now we understand them.

โฑ 45 min
๐Ÿ“ HTML
๐ŸŽฎ Castle Siege โ€” save modal

1Buttons and text fields

castle_siege.html โ€” the save modal HTMLHTML
<!-- The save modal window -->
<div id="modal-bg">
  <div id="modal">

    <!-- Text input field -->
    <input id="save-name"
           maxlength="12"
           placeholder="Enter your name...">

    <!-- Buttons -->
    <button class="mb" onclick="doSave()">๐Ÿ’พ Save</button>
    <button class="mb" onclick="closeModal()">โœ• Cancel</button>

  </div>
</div>
<button>

A clickable button. JavaScript can be run in the onclick attribute.

<input type="text">

Single-line text input. The save system uses this to ask for a name.

<input type="number">

Only accepts numbers. Useful for level or score inputs.

<input type="checkbox">

A tick box. For settings and options.

placeholder=

Faint hint text in an empty field โ€” disappears when typing starts.

maxlength=

Maximum character count in the field (Castle Siege: 12).

โœ๏ธ Lesson 6 Task

Add a "Player Registration" section to your portal!

  • Name field (input, maxlength=15, placeholder="Your name")
  • Favourite game dropdown (select + 3 options)
  • "Register" button (button, onclick=alert('Hi!'))
  • Give buttons a class attribute for styling

๐Ÿง  Which input type only accepts numbers?

<input type="text">
<input type="number">
<input type="integer">
<input numeric>
Phase 1 ยท Lesson 7

CSS โ€” Colour, Font, Size

CSS gives our games their visual appearance. In this first CSS lesson we learn colours, fonts and sizes โ€” through Castle Siege's dark theme.

โฑ 60 min
๐Ÿ“ CSS
๐ŸŽฎ Castle Siege styling

7Lesson โ€” Colour, Font, Size

castle_siege.html โ€” CSS variables and base stylesCSS
/* CSS variables โ€” the entire game's colour palette in one place */
:root {
  --bg: #0d0a05;           /* dark background */
  --player: #00d4ff;      /* blue โ€” player colour */
  --ai: #ff3d6e;           /* red โ€” AI colour */
  --gold: #FFD700;          /* gold โ€” score colour */
}

/* Base style for the whole page */
body {
  background: var(--bg);    /* using a variable */
  color: #c4a870;           /* text colour */
  font-family: Georgia, serif; /* font */
  font-size: 15px;           /* font size */
}

/* Button styles */
.sb {
  background: #1a1208;
  border: 1px solid #5a3a10; /* width | style | colour */
  color: #c4a870;
  border-radius: 4px;          /* rounded corners */
  cursor: pointer;            /* hand cursor on hover */
}
.sb.on {                       /* active button style */
  background: #3a2010;
  border-color: #FFD700;
  color: #FFD700;
}
CSS variables (:root)

Variables declared in :root (--name: value) can be used anywhere in the file. To change a colour, you only need to edit one place โ€” this is the professional approach.

โœ๏ธ Lesson 7 Task

Style your game portal page with CSS:

  • Give the body a dark background (background: #1a1a2a)
  • Change the text colour to light (color: #c4d0e0)
  • Set a Google Fonts typeface (Fredoka One or Nunito)
  • Define 3 CSS variables in :root: --bg, --text, --highlight
  • Use these variables in your styles

๐Ÿง  How do you USE (not define) a CSS variable?

color: --primary;
color: $primary;
color: var(--primary);
color: #{--primary};
Phase 1 ยท Lesson 8

CSS โ€” Box Model

Why is something not where you expected it? The box model explains it. Every HTML element is a box โ€” its size is the sum of content, padding, border and margin.

โฑ 60 min
๐Ÿ“ CSS
๐ŸŽฎ Game panel dimensions

8Lesson โ€” Box Model

box_model.cssCSS
.game-card {
  width: 300px;           /* content width */
  padding: 20px;          /* inner spacing (around content) */
  margin: 10px;           /* outer spacing (around element) */
  border: 2px solid #444; /* border */

  /*
    Actual width = width + padding*2 + border*2
    = 300 + 40 + 4 = 344px
    (unless box-sizing: border-box is set)
  */
}

/* Modern approach โ€” padding and border are included in width */
* {
  box-sizing: border-box; /* present in all our games! */
}
โœ๏ธ Lesson 8 Task

Box model experiments โ€” open browser DevTools (F12 โ†’ Elements):

  • Give the game cards padding: 20px โ€” what happens?
  • Give one card border: 3px solid #4d9fff
  • Add * { box-sizing: border-box } โ€” did anything change?
  • In F12, look at the "Box Model" diagram in the Elements panel โ€” can you see the margin/padding/border layers?

๐Ÿง  What does box-sizing: border-box do?

Removes the border from the calculation
Padding and border are included in the given width, not added on top of it
Only sets the border size
Can only be applied to boxes
Phase 1 ยท Lesson 9

CSS โ€” Flexbox Layout

Flexbox is the modern web layout system. All the HUD panels and button rows in our games are arranged with this.

โฑ 60 min
๐Ÿ“ CSS
๐ŸŽฎ Froggy Rush panel

9Lesson โ€” Flexbox

froggy_rush.html โ€” panel CSSCSS
/* Arranging speed buttons in a row */
#hud {
  display: flex;          /* enable flexbox */
  align-items: center;  /* vertically centred */
  gap: 10px;             /* space between items */
  flex-wrap: wrap;       /* wrap on small screens */
}

/* Froggy Rush page layout */
#layout {
  display: flex;
  gap: 16px;
  justify-content: center; /* centred horizontally */
}

/* Fixing the side panel width */
#panel {
  width: 160px;
  flex-shrink: 0; /* don't let it shrink */
}
โœ๏ธ Lesson 9 Task

Use Flexbox to arrange the game portal cards:

  • Give the #games div display: flex
  • Add gap: 20px between cards
  • Centre them: justify-content: center
  • Try flex-direction: column โ€” what changes?
  • Switch back to row and add flex-wrap: wrap

๐Ÿง  Which CSS property centres flex items horizontally?

align-items: center
justify-content: center
text-align: center
flex-align: center
Phase 1 ยท Lesson 10

CSS โ€” Responsive Design

How does the game look on mobile? With @media rules our games work perfectly on phones and tablets.

โฑ 60 min
๐Ÿ“ CSS
๐ŸŽฎ Mobile D-pad display

10Lesson โ€” Responsive Design

responsive.css โ€” mobile resizingCSS
/* Desktop view: two columns side by side */
#layout {
  display: flex;
  flex-direction: row;   /* horizontal */
}

/* If screen is smaller than 768px (tablet/phone): */
@media (max-width: 768px) {
  #layout {
    flex-direction: column; /* stacked vertically */
  }
  #panel {
    width: 100%;           /* full width */
  }
}

/* If the device is touch (phone/tablet) โ€” D-pad appears */
@media (pointer: coarse) {
  #dpad {
    display: flex;  /* only visible on touch devices */
  }
}
โœ๏ธ Lesson 10 Task

Make the game portal mobile-friendly with @media rules:

  • Add a @media (max-width: 768px) block to your CSS
  • On mobile, stack cards vertically: flex-direction: column
  • On mobile, make cards full width: width: 100%
  • Test with Chrome DevTools: F12 โ†’ phone icon โ€” can you see the mobile view?

๐Ÿง  Which @media condition activates when the screen is smaller than 768px?

@media (screen: mobile)
@media (width < 768px)
@media (max-width: 768px)
@media (min-width: 768px)
Phase 1 ยท Lesson 11

๐Ÿ† Phase Project โ€” Game Portal Page

The closing project for Phase 1. You now know all the HTML and CSS basics โ€” it's time to put together a real, stylish game portal page.

โฑ 2โ€“3 hours
๐ŸŽฏ Independent work
๐Ÿ“ HTML + CSS

11Lesson โ€” ๐Ÿ† Phase Project: Game Portal Page

Phase 1 closing project

You now know all the necessary HTML and CSS fundamentals. It's time to assemble a real, stylish game portal page where your three games appear as links โ€” just like a proper website.

Requirements

games.html โ€” the portal structure to buildHTML
<!DOCTYPE html>
<html lang="en">
<head>
  <!-- charset, viewport, title -->
  <!-- CSS: dark theme, flex layout, card styles -->
  <!-- @media responsive rules -->
</head>
<body>
  <div id="header">
    <h1>๐ŸŽฎ My Games</h1>
    <p>Three browser games I built myself</p>
  </div>

  <div id="games">
    <!-- 3 cards, each containing: -->
    <div class="card">
      <h2>๐Ÿฐ Castle Siege</h2>
      <p>Tower defence game with 50 levels</p>
      <a href="castle_siege.html" target="_blank">
        <button class="play-btn">โ–ถ Play</button>
      </a>
    </div>
    <!-- ... 2 more cards ... -->
  </div>

  <div id="footer">
    <p>Made by: <strong>[Your name]</strong></p>
  </div>
</body>
</html>
โœ๏ธ Lesson 11 โ€” Project Checklist
  • Correct HTML5 document structure (DOCTYPE, html, head, body)
  • Special characters display correctly (charset UTF-8)
  • Readable on mobile (@media and viewport)
  • Dark background, readable text (CSS color + background)
  • 3 game cards in flex layout side by side (desktop)
  • Cards stack vertically on mobile (@media)
  • Every card has a link to the game (target="_blank")
  • Buttons change on hover (:hover CSS)
  • Header and footer are clearly separated
  • Code is tidy and commented