← 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. Usedocument.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>
= newline. No newline after the last line.
Hints4 available
Sign in to use hintsTopics:
HTML DOM
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · 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.