 <p>Do you mean something like this?</p> <pre><code>&lt;html&gt; ... &lt;?php include('codesnippet.php') ?&gt; ... &lt;/html&gt; </code></pre> <p>or the other way (showing the code up in a HTML document)?</p> <pre><code>&lt;pre&gt; &lt;code&gt; &lt;!-- your snippet goes here, with escaped characters --&gt; &lt;/code&gt; &lt;/pre&gt; </code></pre>