Skills practice resource. These guides support teaching and mock projects. They are not a guide to any live OCR set assignment. During your assessed NEA, follow only your teacher's instructions and the OCR set assignment.

Step 11: Add an Interactive Feature (an AI-made Quiz)

Ask an AI for one part, paste it into Add code (from AI) and test it.

You will need

  • An idea for an interactive part (a quiz works well)
  • Access to an AI tool your school allows

Check it worked

  • The feature works in Preview: every button does something
  • It did not change the look of the rest of my page
  • I have noted that I used AI, and what I changed

Steps

Watch a step, pause the video, then do it yourself in WebCraft. These are the same steps as the video.

  1. Ask the AI

    Ask an AI such as Gemini for a quiz. Be clear: say what it's about, how many questions, and ask for HTML, CSS and JavaScript in one part, with no external links.

    WebCraft screenshot: Ask the AI (Gemini or another AI, A clear prompt, Ask for one self-contained part)
  2. Copy the code

    Copy the code from the answer. Don't worry about the extra chat text. WebCraft will tidy it.

    WebCraft screenshot: Copy the code (Copy the whole answer, Do not edit it, WebCraft will tidy it)
  3. Add code (from AI)

    In the Add tab, drag in the Add code (from AI) block, and paste the code into the box.

    WebCraft screenshot: Add code (from AI) (Add tab, Add code (from AI), Paste into the box)
  4. Tidy and add

    Click Tidy and add. WebCraft removes the parts that would break your page, and lists them under What I tidied.

    WebCraft screenshot: Tidy and add (Click Tidy and add, What I tidied, Read the list)
  5. Test it in Preview

    Now test it in Preview. Answer every question and check the score works.

    WebCraft screenshot: Test it in Preview (Preview, Answer every question, Check it works)
  6. Use AI safely

    Use AI safely: never share personal details, check everything it makes, and say in your project that you used it.

    WebCraft screenshot: Use AI safely (Never share personal details, Check what it made, Say you used AI)

Project Log evidence

  • Your prompt, the What I tidied list and a screenshot of the working feature
  • A sentence crediting the AI

Common problems

The quiz buttons do nothing in Design view
Scripts run in Preview and on your finished site, not in Design view.
It stopped working after tidying
It may have used a library from the internet. Ask the AI for a version with no external libraries.