Code
Inline
Wrap inline snippets of code with <code>.
For example,
<section> should be wrapped as inline.= 'For example, '
code <section>
= ' should be wrapped as inline.'
For example, <code><section></code> should be wrapped as inline.Block
Use <pre> for multiple lines of code.
<h1>Sample heading here...</h1><h1>Sample heading here...</h1>
<p>Sample content here...</p>pre
code
| <h1>Sample heading here...</h1>
pre
code
| <h1>Sample heading here...</h1>
<p>Sample content here...</p>
<pre><code><h1>Sample heading here...</h1></code></pre><pre><code><h1>Sample heading here...</h1>
<p>Sample content here...</p></code></pre>Selectable
For showing a code snippet which is selected automatically on clicking, add .code-snippet to a <input type="text"> or <textarea> element.
Don't forget to add readonly attribute and onclick="this.select()".
input.code-snippet type="text" readonly="readonly" value="<h1>Sample heading here...</h1>" onclick="this.select()"
textarea.code-snippet readonly="readonly" onclick="this.select()"
| <h1>Sample heading here...</h1>
<p>Sample content here...</p>
<input class="code-snippet" type="text" readonly="readonly" value="<h1>Sample heading here...</h1>" onclick="this.select()" /><textarea class="code-snippet" readonly="readonly" onclick="this.select()"><h1>Sample heading here...</h1>
<p>Sample content here...</p></textarea>Syntax highlight
wip