title: How to correct HTML syntax due to a string literal error?
body: <p>I'm adding some HTML code to a servlet but when I paste in the code it, Eclipse throws an error saying that <code>String literal is not properly closed by a double-quote</code>.</p>
  
  <p>I tried to fix this by checking the syntax of the block of HTML but it seems to be correct.</p>
  
  <p>Can anyone spot the error in the declaration?</p>
  
  <p>This is the offending piece of code:</p>
  
  <pre><code>out.println (
        "&lt;!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" 
            \"http://www.w3.org/TR/html4/loose.dtd\"&gt;\n" +
        "&lt;html&gt; \n" +
          "&lt;head&gt; \n" +
            "&lt;meta http-equiv=\"Content-Type\" content=\"text/html; 
              charset=ISO-8859-1\"&gt; \n" +
            "&lt;title&gt; My first jsp  &lt;/title&gt; \n" +
          "&lt;/head&gt; \n" +
          "&lt;body&gt; \n" +
            "&lt;font size=\"12px\" color=\"" + color + "\"&gt;" +
              "Hello World" +
            "&lt;/font&gt; \n" +
          "&lt;/body&gt; \n" +
        "&lt;/html&gt;" 
      );  
  </code></pre>