By the way, if your website only uses minimal styling, or no styles at all, consider setting

<meta name="color-scheme" content="light dark" />

in the <head>. This allows browsers to also use their default dark mode styles on your page, without you having to do anything. If you don't, it'll always be light mode.

For example, these screenshots show this minimal document and how it will be rendered when the browser is set to light or dark mode.

#HTML #DarkMode #WebDev #WebDesign #accessibility

@scy
Sehr interessant, ich hab ja gerade Web Dev in der Umschulung. 

@scy You said Sergio? From Rio? Light-ish dark-ish website?

You know Sergio! 🎉

@lenaschimmel Wow, I haven't thought of Sergio in a looong time.

@scy Done on two simple homepages.

Also, here's a link to the documentation for anyone interested: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/meta/name/color-scheme

<meta name="color-scheme"> - HTML | MDN

The color-scheme value for the name attribute of the <meta> element indicates a suggested color scheme that user agents should use for a page. If specified, you define the color scheme using a content attribute in the <meta> element with a valid CSS color-scheme value.

MDN Web Docs
@Changaco lol I had that in my clipboard and totally forgot to paste it in. And now there's no space left in the post. Ah well, thanks for the amendment :)
@scy do I have to put it in the <thead> of all my layout tables too?

@scy holy crap there *is* an option to do it without manually writing CSS in media selectors...

brb, going to add it NOW

@scy this is also possible from css, color-scheme: light dark;
@scy Damn! That's super cool to learn. Thank you!
@scy why are you putting the / in the tag

@anselmschueler To keep it compatible to XML.

XHTML is somewhat out of fashion since HTML5, but I'm old.

https://en.wikipedia.org/wiki/XHTML

XHTML - Wikipedia

@scy my webbed site will use lots of styling and i have set this anyway. turning off css in your browser go brrrrrr.
@scy love it, now I got to add it to hundreds of pages, 😂
@scy Saw this months ago and bookmarked it for the next time I updated a little microcontroller I use to control my bedroom ceiling fan. Thank you! Great tip!