โ Back to HTML DOM
Question 6
Update Text and Add Class
Update Text and Add Class
Select the paragraph with id="status", change its text content to "Complete", and add the CSS class "done" to it. Platform-Provided HTML (READ-ONLY): <div id="app"> <p id="status">Pending</p> </div> Steps: 1. Use document.getElementById() to select the paragraph 2. Change its text content to "Complete" 3. Add the CSS class "done" to it
Expected Output:
<div id="app"> <p id="status" class="done">Complete</p> </div>
Topics:
HTML DOM
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.