document getElementById() Method Syntax:
document getElementById() Method Parameters
The method takes one parameter, and that is the value of an id attribute.
document getElementById() Method Return Value
The return value of the getElementById() method is an object reference to the target element in an HTML document.
Note: because the value for an id attribute is set to be unique, calling this method only returns one reference to an element that has this value for its id. That means if in a page, mistakenly there are multiple elements with the same value for their id attribute, only a reference to one of them will return and not a collection of references!
Here we’ve used this method to access the body element in this document by setting the value “body” which is the current value of its id attribute as the argument of this method. After that, we’ve used the `style` property of the returned object and the backgroundColor property to change the background color of the <body> element to light-blue.