The above example clearly shows that the style property helps in changing the web page color with the applicability of this function. However, in any case, if you are using a DIV container or any other element then one needs to modify the background of that element instead of the web page document body.
The example provided above shows that the usage of ‘style property’ instead of any kind of element attributes will help in not overwriting the CSS properties that may be otherwise specified in any of the style attributes used while designing the Web Page.
Even another important point relative to the style property is that if it is applied to any element then it only provides back its value. Like, if you want to change the background color of a specific web page or just the text body then ‘style property’ applicability will help in carrying out the needful.