CJCoding With Joseph
15free / daySign inCreate account

Add CSS Class to Heading

Select the heading with id="pageTitle" and add the CSS class "highlight" to it.

Platform-Provided HTML (READ-ONLY):
<div id="page">
  <h1 id="pageTitle">Welcome</h1>
</div>

Steps:
1. Use document.getElementById() to select the heading
2. Use classList.add() to add the "highlight" class

Expected Output:

<div id="page">
  <h1 id="pageTitle" class="highlight">Welcome</h1>
</div>

= newline. No newline after the last line.

Hints2 available
Topics:
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.