From 12b5873e13a92dbac03d779c8fe5d8eacb034be2 Mon Sep 17 00:00:00 2001 From: Yan Zhu Date: Wed, 1 Mar 2017 14:39:52 +0800 Subject: CHG: Cleanup Codes code and docs --- docs/elements.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'docs/elements.html') diff --git a/docs/elements.html b/docs/elements.html index c102e90..63e038c 100644 --- a/docs/elements.html +++ b/docs/elements.html @@ -970,11 +970,15 @@

Codes

-

Codes are inline and multiline code snippets blocks.

+

Codes are inline and multiline code snippets.

+

For inline code, you can use the element <code>. For multiline code snippet blocks, you can use <pre> with the class code as a container, and add <code> inside it. The attribute data-lang is rendered as the language name in the top right.

<pre class="code" data-lang="HTML"><code><!-- code snippets -->
+&lt;<span class="tag">button</span> <span class="atn">class</span>=<span class="atv">&quot;btn&quot;</span>&gt;
+  Submit
+&lt;<span class="tag">/button</span>&gt;
 </code></pre>
 
-- cgit v1.3.1-23-gd82d