When outputting HTML, it is easier to use single quotes so that you can use the correct double quotes inside like this:
echo '<div id="errormsg"> Error </div>';
This will save you a parsing error ... To change the style, you will need to use CSS with a selector #errormsgas follows:
#errormsg {
color: red;
}
source
share