title: XHTML document type does not allow element "style" in body
body: <p>I have a document using XHTML Transitional. In the body I use a <code>&lt;noscript&gt;</code> tag with a <code>&lt;style type="text/css"&gt;</code>.</p>
  
  <p>I know that <code>&lt;style type="text/css"&gt;</code> is only allowed in the <code>&lt;head&gt;</code>, but still I need to have the CSS applied only if JavaScript isn't detected.</p>
  
  <p>How can I solve this problem, while still passing XHTML validation?</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;body&gt;
    &lt;noscript&gt;
      &lt;div id="section-featured-nojavascript" class="section"&gt;
        &lt;style type="text/css"&gt;
          #featured, #section-portfolio { display:none; visibility:hidden }
        &lt;/style&gt;
      &lt;/div&gt;
    &lt;/noscript&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>ERROR when validation using W3</p>
  
  <pre><code>document type does not allow element "style" here [XHTML 1.0 Transitional]
  </code></pre>