The behaviour layer: JavaScript
The programming language that adds behaviour to a web page, such as reacting to a click, on top of its HTML content and structure and its CSS presentation.
Understanding The behaviour layer: JavaScript in ACARA Digital Technologies Years 9–10
What it does: An if statement is a programming instruction that makes a decision. HTML and CSS are markup languages and cannot do this. addEventListener makes the page react to a click, which is behaviour. A CSS rule like color: red only changes how the button looks. Reacting to a click is behaviour. Colours and rounded corners are presentation, set with CSS. Content and structure come from HTML, and presentation from CSS. A page can work without JavaScript, but it will have no custom behaviour.
Common mistakes: Adding () calls sayHi straight away, when the page loads. To run it on a click, give the browser the function itself: document.onclick = sayHi;. JavaScript is linked with a script element. A style element is for CSS (presentation), so the behaviour code would never run. It should be <script src="app.js"></script>.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 116–154) and word search (Modules 116–225).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
JavaScriptFill in the Blanks
Spot the Error
Student with a class code? Join your class →