<html>
<body id="w3s" bgcolor="#E6E6FA">
<script>
document.write("The background color is: ")
document.write(document.getElementById("w3s").bgColor);
</script>
<p><b>Note:</b> Internet Explorer always returns the colors in hex, while most other browsers returns the attribute value.</p>
<p><b>Note:</b> If using color names, different browsers may render different colors, and Firefox have problems if the attribute value is in RGB code (will not display correct color).</p>
<p><b>Tip:</b> To produce equal results in all browsers, always use hex code to specify colors.</p>
</body>
</html>