light/dark mode in html, without CSS (only html)


يرجى شرح بإيجاز لمإذا تشعر أنك ينبغي الإبلاغ عن هذا السؤال.


it there a way to make the HTML elements be in dark mode

if the user has activated in his system “dark mode”
and if the user is like to use standard colors, to be “light mode”

all this automatically when the user opens the website.
without any buttons.

and I want that if the user changes the theme color preference from the setting, it will automatically switch to the correct one directly without refreshing the page.

the black and white color of text, I want that don’t use any CSS

so not using CSS. in this project I am using only HTML.

<!– here is example of tags to color automatically for the answer –>
<span>hello world<span>

if there a way to do this with one line or 2 maximum.

maybe adding a library with no configuration needed, but I don’t find it

X 5 أشهر 2022-07-10T12:00:36+03:00 0 إجابة 1 مشاهدات مبتدئ 0

‫أضف إجابة


مجهول يجيب