PF 102 study hub

PF 102 · Hands-on · ~45–60 min

Interactive Web Page → GitHub Pages

Build a small web page that reacts to user events, push it to your own GitHub repository, and deploy it on GitHub Pages.

Your progress

0 / 12

Before you start

Check these off so you’re ready to build.

STEP 1

Create a new Git repository

  1. 1

    Create a new project folder for your interactive page.

  2. 2

    Open the folder in VS Code.

  3. 3

    Initialize a new local Git repository.

STEP 2

Build the page structure

  1. 1

    Create an index.html file with a proper HTML document structure.

  2. 2

    Add a heading, a button, a paragraph or status area, and a text input.

  3. 3

    Give the interactive elements clear identifiers so JavaScript can find them.

  4. 4

    Connect the page to separate CSS and JavaScript files.

Open the page in a browser and confirm every required element appears.

STEP 3

Style the interface

  1. 1

    Create a separate stylesheet and give the page a clear, readable layout.

  2. 2

    Style the button, text input, and status area so their normal states are easy to recognize.

  3. 3

    Prepare visible style changes that your event handlers can apply.

The page should look complete before JavaScript behavior is added.

STEP 4

Add event-driven behavior

  1. 1

    Use JavaScript event listeners instead of inline event attributes.

  2. 2

    Add a click event that changes visible page content or styling.

  3. 3

    Add mouseover and mouseout behavior to one element.

  4. 4

    Add a focus event to the text input.

  5. 5

    Make every handler produce a visible result that can be demonstrated.

You must be able to identify the event, listener, handler, and visible update for each interaction.

STEP 5

Test and debug

  1. 1

    Test every interaction more than once and confirm the page remains usable.

  2. 2

    Refresh the page and test the events again.

  3. 3

    Open the browser console and resolve any errors.

  4. 4

    Confirm that your HTML, CSS, and JavaScript are in separate files.

All required events work and the browser console has no red errors.

STEP 6

Commit and push to GitHub

  1. 1

    Stage your project files and create a clear commit.

  2. 2

    Create a new public repository under your own GitHub account.

  3. 3

    Connect the local repository to the GitHub repository and push your main branch.

  4. 4

    Confirm your HTML, CSS, and JavaScript files appear on GitHub.

STEP 7

Deploy to GitHub Pages

  1. 1

    Open the Pages section in your repository settings.

  2. 2

    Deploy from the main branch and root folder.

  3. 3

    Wait for GitHub to publish the site, then open the live URL.

  4. 4

    Test every event on the deployed page.

The submitted live URL must load the page and all required events must work.

Done checklist

Tick everything before you submit.

Submit

Turn in both URLs. Be ready to demonstrate each event in class.

Repository
Your GitHub repository URL
Live page
Your GitHub Pages URL

Need to review the event pattern? Open the PF 102 study hub.