Lesson 2 of 7
Grab an element from the page
document.querySelector('#id') grabs the element carrying that id — it's your remote control for the page.
Once you have the element, textContent reads or replaces its text.
<p id="status">waiting…</p>
<script>
document.querySelector('#status').textContent = 'ready';
</script>🎯 Your goal
In the <script>, grab the #status paragraph and replace its text with exactly ready.
PRO lesson
This advanced chapter is part of CodeAge PRO. Unlock it to keep your adventure going.
Discover PRO →