
How to set a HTML document's background color?

You can set the background color of a html document using java script as follows.
<script type="text/javascript"> document.body.bgColor="purple"; </script>

Hi, You can go through www.w3schools.com for the HTML tutorial.
Thanks,
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.