0

How to change font color in document.write

24th Feb 2018, 5:31 PM
Abhishek
Abhishek - avatar
2 Answers
+ 6
document.write("<span style='color: red'>Changed</span>");
24th Feb 2018, 5:58 PM
Amethyst Animion
Amethyst Animion - avatar
+ 2
I have not tried this, but if you change the root element style that should affect the style of the text that document.write displays.
24th Feb 2018, 6:27 PM
Mickel
Mickel - avatar