DEV Community


Discussion on: What is the color of a blank page?

simevidas profile image
Šime Vidas

The background of the root element becomes the background of the canvas and its background painting area extends to cover the entire canvas.

Human translation: you put a background on the body. The browser will use that as a background for the canvas.

Small correction: The “root element” is the <html> element, not the <body> element.

bcalou profile image
Bastien Calou Author • Edited

Small shortcut, I agree. The <html> is of course the root, but the browser uses the <body> rules as if they were set on the <html>.

"The used values of that BODY element’s background properties are their initial values, and the propagated values are treated as if they were specified on the root element."