Beginner level · Module 3 of 5 · 10 guided hours
JavaScript for Web Pages
Learn enough JavaScript to make web pages interactive: variables, functions, the DOM, events and form handling.
Learning objectives
- Write basic JavaScript with variables, conditions, loops and functions
- Select and update page elements
- Handle clicks and form submissions
Topics
- script loading with defer
- variables, conditions and functions
- arrays and objects
- querySelector and textContent
- event listeners
- form validation messages
Lessons
-
Lesson 1 JavaScript Essentials for the Web
Write the core JavaScript a web developer needs: variables, conditions, loops, functions, arrays and objects.
const and letif/else and ===functionsarrays of objects
-
Lesson 2 Changing the Page with the DOM
Select elements, change their content and classes, and generate lists from data.
querySelectortextContentclassListcreateElement and append
-
Lesson 3 Events and Form Handling
Respond to clicks and form submissions, validate input and show friendly messages without reloading the page.
addEventListenersubmit and preventDefaultvalidation messagesaria-live
Practical activity
Add a filterable list of services (by category) and an enquiry form with friendly validation messages to the organisation site.
Expected outcomes
- Interactive features built with plain JavaScript
- Forms that guide users to correct input
Assessment
Practical: add one interactive feature to a provided page; marked on behaviour, accessibility and absence of console errors.
Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.