There are a few reasons why these differences might occur:
Some browsers apply a default background to the 'html' element but not the 'body' element, or vice versa. For example, in some browsers, the 'html' element naturally has a white background.
When you set a background color for 'html', it typically extends across the entire viewport, especially if the 'body' doesn’t have an explicit background.
On the other hand, setting a background color for 'body' may only affect the content inside it and might not extend beyond it—this can be noticeable when the page is shorter than the viewport.
Additionally, different browsers handle background rendering in their own way. Some treat the 'html' element as the background for the entire viewport, while others allow the 'body' element to take control.
To ensure consistency across browsers, using a CSS reset like Normalize.css can help override these default behaviors and create a more uniform appearance.