i am making a text adventure game and i was wondering if i could some how change the color of text then put that text in a var with other text and output it some how so it keeps its color sort of like this

var a = "red text "
var b = "blue text "
var c = "greentext "
var all = a + b + c

document.write (all)

red text blue text green text

i hope you understand what i mean