title: How to put a block-level element inside an inline element?
body: <p>In part of my code I put <code>&lt;DIV&gt;</code> element inside <code>&lt;SPAN&gt;</code>. With CSS customisation it works without problem, but page is not passing W3 validation.</p>
  
  <p>Code looks like this:</p>
  
  <pre><code>&lt;span class="spanclass"&gt;
      &lt;div class="divclass"&gt;Content&lt;/div&gt;
  &lt;/span&gt;
  </code></pre>
  
  <p>After validation I got this error:</p>
  
  <blockquote>
    <p>The mentioned element is not allowed to appear in the context in which
    you've placed it; the other mentioned elements are the only ones that
    are both allowed there and can contain the element mentioned. This
    might mean that you need a containing element, or possibly that you've
    forgotten to close a previous element. One possible cause for this
    message is that you have attempted to put a block-level element (such
    as "<code>&lt;p&gt;</code>" or "<code>&lt;table&gt;</code>") inside an inline element (such as "<code>&lt;a&gt;</code>" <code>&lt;span&gt;</code>", or "<code>&lt;font&gt;</code>").</p>
  </blockquote>
  
  <p>I know this can be fixed easy if I'll put <code>&lt;div&gt;</code> instead of <code>&lt;span&gt;</code>, but I'm interested in another solution:</p>
  
  <p>How to force validator with <code>DTD</code> declaration, to allow block-level element in inline element?</p>