For a long time there was something called document.bgcolor , or something like that, which would set the background of the document itself, but it was deprecated.
Instead, it was decided that setting document.body.style.backgroundColor or, in other words, setting the background of the body will also automatically set the background color for the document , since the document object does not have the styl e property, but it is still displayed when the body elements / html does not completely cover the document, so the whole page turns black even if the body element does not cover the entire document.
adeneo
source share