CJCoding With Joseph
15free / daySign inCreate account

Change Multiple CSS Styles

Select the paragraph with id="styledText" and change its color to "blue", fontSize to "20px", and backgroundColor to "lightyellow".

Platform-Provided HTML (READ-ONLY):
<div id="content">
  <p id="styledText">Style me with JavaScript!</p>
</div>

Steps:
1. Use document.getElementById() to select the paragraph
2. Use the style property to change color, fontSize, and backgroundColor
3. Remember: CSS properties use camelCase in JavaScript (background-color becomes backgroundColor)

Expected Output:

<div id="content">
  <p id="styledText" style="color: blue; font-size: 20px; background-color: lightyellow;">Style me with JavaScript!</p>
</div>

= newline. No newline after the last line.

Hints4 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.