Using Google Chrome (or Microsoft Edge) on Windows 11, I cannot visualize a very simple HTML page with a white background.
If you try to visualize the following page with Edge, the background will always be black:
<html>
<head>
<title>Test</title>
<style type="text/css">
body { background-color: white; }
</style>
</head>
<body>
TEST
</body>
</html>
If I set background-color: red
, the background will be red, as expected.
Firefox has the page displayed correctly in all cases.
How to display a page with a white background?
2
Answers
I found the reason. On all my computers I use the
force dark
setting for both Chrome and Edge. This setting causes all web pages not having explicit support for dark mode to render as if they were using dark mode:If I restore the default value for this setting (
Default
instead ofEnabled
), the background can indeed be white.I think that because you are using a corrupted chrome or edge ,Try to reinstall them, or use the
sfc/scannow
,that should fix all corrupted file, from them the web browsers’ too like what I think. Try that and see.