If you want to do a bit of inline-code
, use the the <code>
element or span.code
.
Use a nested combination of <pre>
and <code>
for a code block.
<h1>This is a sample code block</h1>
<p>I'm text!</p>
If you use Pygments code formatting you can use ebi-code.css for syntax highlighting, like so:
<h1>This is a sample HTML code block</h1>
<p>I'm text!</p>
function text() {
print '<h1>This is a sample PHP code block</h1>' . '<p>I'm text!</p>';
return true;
}