Change Multiple CSS Styles
easyQuestion 12Select 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
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.