1. Writing stuff #
Created Wednesday 17 June 2020
Basic text constructs #
h1
⇒ heading, h6 is the smallest.p
⇒ paragraph tag, the attributecontenteditable="true"
is omitted generally.strong
⇒ bold textem
⇒ italicized text<br />
⇒ newline<hr />
⇒ visible horizontal separatorcite
⇒ citation (displayed as italicized)pre
⇒ pre-formatted or verbatim text<blockquote cite="">
⇒ indentedq
⇒ Quote, Italicizedabbr
⇒ abbreviation. Short is new,<acronym>
is obsolete.dfn
⇒ definition.
Code and scientific notation #
eqn
- for equations.code
- Mostly the code is wrapped by a<pre>
wrapped by a<code>
element.samp
The output of the code.var
represents a variable.sub
is used for subscript text. CH~4~.sup
is used for superscript text. E=mc^2^.
HTML Entities #
- As discussed before, browser ignores whitespace in HTML content.
- So - whitespace, operators and emojis are handled using
entitites
. - Syntax for entities - there are 3 equivalent notations -
&code;
,&#decimal;
and&#hex;
- How to use - just write the entity in the content.
Examples
Miscellaneous #
<kbd> Ctrl+S </kbd>
for keybindings.address
⇒ italicizes the address.- Use the
title
attribute for abbreviations and citations. This usually adds a hover tooltip to the whole HTML element.
Demo #
<code>
x = 5;<br>
y = 6;<br>
z = x + y;
</code>
<!-- samp - output of the program -->
<p>If you input wrong value, the program will return <samp>Error!</samp></p>
<!-- 2. kbd - represents keyboard input: For quick action, very important in PCs Rendered differenetly-->
<p>Save the document by pressing <kbd>Ctrl + S</kbd></p>
<!-- var helps us render a variable differently - italicised -->
Einstein wrote: <var>E</var> = <var>mc</var><sup>2</sup>.