Wikipad – Unofficial Coding Documentation

Content Containers

Used to contain other elements, organising them into different sections of the document.

Contents

  1. div
    <div>
  2. span
    <span>

div

A block-level element used to section the document.

Demo:

div
<div>div</div>

align=""

Used to designate which direction the text should be read from (left to right or right to left). Only use dir="auto" if the text direction is unknown.

Demo:

One Two Three Four
<div dir="ltr">One Two Three Four</div>
One Two Three Four
<div dir="rtl">One Two Three Four</div>
One Two Three Four
<div dir="auto">One Two Three Four</div>

lang=""

Used to specify the language of the text. This attribute only accepts ISO 639-1 language codes as values, see here for a full list.

Aside from semantics, specifying the language will ensure that browsers render non-english characters correctly (issue described here).

Demo:

This text is in English
<div lang="en">This text is in English</div>

style=""

Allows for the use of CSS styles but only when font-size is the first style specified. This has been acknowledge and permitted for use by the site admin[source].

Note: The style="" property no longer works on <span> but does work for <div> as if an unannounced update sometime bewteen April-May 2024>. Prior to this, the style="" property was usable on <span> but not <div>.

Demo:

Oh no! It didn't work!
<div style="color: var(--success);">Oh no! It didn't work!</div>
It worked!
<div style="
font-size:;
var(--success);">It worked!</div>

span

Normally used to group inline elements together however, on Wacky Writers this is the only element where CSS styles can be used.

Demo:

span
<span>span</span>

lang=""

Used to specify the language of the text. This attribute only accepts ISO 639-1 language codes as values, see here for a full list.

Aside from semantics, specifying the language will ensure that browsers render non-english characters correctly (issue described here).

Demo:

This text is in English
<span lang="en">This text is in English</span>

Back to HTML Reference
Spot something we didn't? Let us know!