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 –>
<h1>
<span>hello world<span>
<input>

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

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

‫أضف إجابة

تصفح
تصفح

مجهول يجيب