html - How can I change the font color of all texts of your website using Javascript? -


i learned, there ways change color of single texts. i'd find out how change color of texts of website @ 1 time.

i found document.body.style.backgroundcolor = "black"; function , hoped there similar fonts.

edit: sorry. guess misleading people. know css ofcourse... wanted find way change colors while using website. i'd find way change css properties via javascript.

use css color property:

css

* {    color:  [color-value]; } 

this change font color of elements using universal (*) selector. if necessary, may need use !important declaration (not recommended, useful: see link) override other styles.

javascript

document.body.style.color = [color-value]; 

Comments