โ Back to HTML DOM
Question 139
Uppercase an Element's Text
Uppercase an Element's Text
Select the heading with id="heading", read its current text, and replace it with the UPPERCASE version. The result should read "WELCOME HOME". Platform-Provided HTML (READ-ONLY): <h2 id="heading">welcome home</h2> Steps: 1. Select the heading and read itstextContent. 2. Convert it with.toUpperCase()and assign it back totextContent.
Expected Output:
<h2 id="heading">WELCOME HOME</h2>
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.