Search⌘ K
AI Features

Make the Page Talk Back

Explore how to make a webpage respond by learning to locate elements with document.getElementById and update their text with innerText. Understand how JavaScript interacts with HTML to modify page content live, without altering the original code. This lesson helps you build foundational skills in DOM manipulation for interactive web development.

Now that you’ve said hello to the browser, it’s time to get the web page itself to talk back to you.

You’ll learn how to grab something on the page and change what it says using JavaScript.

Goal

You’ll aim to:

  • Use JavaScript to change what appears on the page.

  • Understand document.getElementById() and .innerText.

  • Start interacting with real HTML. ...

The setup