01 · LEARNING TARGETS
What students should understand today
- Document.QueryselectorUnderstand what it means, where it is used and practise it in a small example.
- TextcontentUnderstand what it means, where it is used and practise it in a small example.
- ClasslistUnderstand what it means, where it is used and practise it in a small example.
- Dom ElementsUnderstand what it means, where it is used and practise it in a small example.
02 · TEACHING NOTES
Core lesson
Start with the idea, not the syntax. Select HTML elements and change text, classes and simple styles with JavaScript. The instructor should connect the topic to something students already understand, then introduce the exact terms they need for today.
Build in small steps. The teacher demonstrates one clean pattern, then students recreate it with their own content and styling so they understand the structure rather than copying blindly. Pause after each important change and ask students to predict what will happen before running or refreshing the result.
Develop good habits. Students should keep the browser and code editor open side-by-side, save often and refresh after each small change. Keep naming, indentation/structure and output clear enough that another student could follow the work.
03 · LIVE BUILD
Click a test button in DevTools code to update a heading and status badge.
1Plan the result first: decide what the user/student should see or be able to do at the end.
2Build the smallest working version using today’s main concepts and test it immediately.
3Add one improvement at a time and ask students to explain why each line/element is needed.
4Test with at least two different inputs, screen sizes or scenarios and fix one issue together.
04 · STUDENT CHALLENGE
Independent practice
Select three page elements and change their content or class.
Teacher rule: give hints in steps, but avoid typing the complete answer for the student. The goal is to make them think, try and correct.
05 · END-OF-DAY CHECK
Before moving to the next day
- I can explain document.querySelector in simple words.
- I can explain textContent in simple words.
- I can explain classList in simple words.
- I can complete today’s mini task with only small hints.
Optional 10–15 minute home practiceRebuild today’s example once without looking at the finished version. Change the names, values, text or design so the result is clearly your own.