In HTML the html element is known as the root element.  All other elements on a page are inside it.  You can therefore style it like this:

html {
    background-color:blue;
}

Now everything on the page will share the same background colour because all the other elements inherit the style from the root element.

More specific CSS selectors override more general ones.  This is why you will normally not style the HTML element directly but instead you use a pseudoclass:

:root {
    background-color:blue;
}

This normally does exactly the same but is more correct.