Based off this thread: Using a CSS Stylesheet with Javascript .innerHTML
To stylize a innerHTML such as this:
document.getElementById("ID").innerHTML = "This is your error";
all you need to is this:
document.getElementById('error-message').innerHTML = "<span class='error'>my
error</span>";
But what If I have a value? How would I apply the tag to this:
document.getElementById('pText').innerHTML = "You clicked: " + value;