Source Code:
(back to article)
Submit
Result:
Report an issue
<style> #myParagraph { color: white; /* Ensures text is readable on a blue background */ } </style> <div id="myParagraph">This is a paragraph.</div> <script> document.getElementById("myParagraph").style.backgroundColor = "blue"; document.getElementById("myParagraph").style.fontSize = "16px"; </script>