Emphasizing Text
Use <em>
to italicize text, indicating emphasis:
<em>This text is emphasized.</em>
Use <strong>
to bold text, indicating strong importance:
<strong>This text is strong.</strong>
Quotations
Use <q>
for short inline quotations:
<p>He said, <q>Hello there!</q></p>
Use <blockquote>
for longer block quotations:
<blockquote>This is a longer block of text that is quoted from another source.</blockquote>
Code Snippets
Use <code>
to display a single code snippet inline:
<p>Use the <code><div></code> tag to define a division.</p>
Use <pre>
to display formatted code blocks:
<pre><code>function KnowledgeWorld() {
alert('Knowledge is Power, world!');
}</code></pre>
Formatting Text
Use <small>
to display smaller text:
<small>This text is smaller in size.</small>
Use <mark>
to highlight text:
<mark>This text is highlighted.</mark>
Use <del>
to show text that has been deleted:
<del>This text is deleted.</del>
Use <ins>
to show text that has been inserted:
<ins>This text is inserted.</ins>
Use <sub>
for subscript:
H<sub>2</sub>O
Use <sup>
for superscript:
E = mc<sup>2</sup>