What students should practice here
The focus is not memorizing APIs in isolation. Students should connect each DOM method to visible behavior: find an element, update it safely, validate input, move nodes around, and build reusable UI pieces.
- Use
querySelectorandquerySelectorAllconsistently. - Prefer
textContentwhen updating user-facing text. - Manipulate classes through
classList, not string concatenation. - Batch related DOM updates and reset state cleanly.
- Treat forms and modal flows as real product features, not toy examples.