The single quotes work because you wrap everything you want to echo in double quotes. So if you include double quotes inside the tags you are echoing out, when the parser gets to the first double quote it thinks it has reached the end of the echo statement and looks for the ;
When it doesn’t find it, it errors out.