Beginner
60 mins
Teacher/Student led
+125 XP

Make It Count

You will learn to add a counter to your web page and create buttons that change the number when clicked. This makes your site interactive so visitors can count goals, books or other things that matter to you.

Teacher Class Feed

Load previous activity

    1 - Start: What We're Building ~5 mins

    Today your page stops being something people only read.

    You will add a counter and a special button from Apps, so a visitor can press it and the number goes up.

    By the end, your site will keep score of something real, like goals, books or days to the holidays.

    2 - A Page That Counts ~5 mins

    Some pages only show words and pictures. Others can change when a visitor uses them.

    Today you use blocks from a new group called Apps.

    Key point

    A counter holds a number on the page. A special button from Apps can change that number.

    3 - Add a Counter and Name It ~8 mins

    Open the interactive activity. You should see your site or the two club pages (Home and Scores). Build on what you see.

    Key point

    Important: put the counter on the page before you add any action that changes it, or the action cannot find it.

    1. Click the page where you want the count to show (many people use their second page).
    2. From Apps, drag a counter block onto that page.
    3. Put it inside the coloured box from Layout if you already have one, so the number sits neatly with your other content.
    4. Type a short name for the counter, such as goals.
    5. Leave the starting number as it is for now.

    Check before you move on: open the Your web page tab. You should see a number on the page, often starting at 0.

    Watch out

    If you cannot see it, go back to Blocks and check the counter is snapped inside the page (or inside the box on that page), not left beside it.

    Empty screen with no pages at all? Ask your teacher before using Start again.

    Interactive activity

    4 - Add a Button When Clicked ~7 mins

    Stay on the same page as your counter.

    Watch out

    Important: do not use the plain button from Links & buttons. That one only jumps to another page. You need button when clicked from Apps.

    1. From Apps, drag a button when clicked block onto that page.
    2. Put it just under the counter, still inside the page (or inside the same Layout box).
    3. Change the button's label to something clear, such as Add a goal.
    Pause and check

    Pause and check: open Your web page. You should see your new button on the page. It may do nothing yet. That is fine. Come back to Blocks for the next step.

    Interactive activity

    5 - Put Change Counter Inside ~7 mins

    Key point

    Keep your button when clicked on the same page as the counter.

    1. From Apps, drag a change counter block.
    2. Snap it inside your button when clicked block, not under the page on its own.
    3. Open the dropdown on the change counter block and pick the counter you named (for example goals).
    4. If the dropdown says (add a counter), stop. Go back and put a counter on the page first, then return here.
    5. Set the change to 1 so each press adds one.
    Example

    Your stack should look like this:

    • counter named goals (or your name)
    • button when clicked labelled Add a goal (or your label)
    • change counter tucked inside that button, set to your counter by 1

    Interactive activity

    DigitalSkills.org · Online learning platform

    Unlock the full learning experience

    You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.

    Hundreds of curriculum-aligned lessons
    Interactive activities in every lesson
    Printable resources & progress tracking
    Copyright Notice
    This lesson is copyright of DigitalSkills.org 2017 - 2025. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more