Shortform HTML Tags (SHT)

Shortform HTML Tags (SHT) is a set of simple rules that transform your documents into plain HTML. It serves the same function as something like Markdown — makes it easier for you to write HTML.

SHT syntax has only a few rules and is super easy to learn and use.

Syntax

Here, foo and bar could be any HTML or SunSed tag:

HTML

<foo>
    Content <bar>inline<bar>.
</foo>

Shortfrom HTML Tags

:foo Content :bar[inline].    

Just remember that the content of :foo should be on the same line — you cannot hit enter and continue writing its content on the next line.

That's it, now you know the entire syntax of Shortform HTML Tags.

You can even Mix HTML and its Shortform Tags:

EXAMPLE
<div>
    :p This is a paragraph.
    <div>
        :s:img https://image-url.png Image Description
    </div>
</div>

Don't know <s:img>? Learn more.

The exception for <p>

Since we write so many paragraphs in our HTML documents, it is valid to drop the p — any line that starts with : following by a space, is considered a paragraph.

EXAMPLE
:p This is a paragraph.
: This is also a paragrph.
OUTPUT
<p>This is a paragraph.</p>
<p>This is also a paragraph.</p>

Multiline Content

The content for each shortform HTML tag should be on the same line. For example:

INPUT
: My paragraph is
awesome.

Results to:

OUTPUT
<p>My paragraph is</p>
awesome.

For situations where you need to contniue the content on the next line(s), you can use :- at the beginning of each continues line(s).

EXAMPLE
: My paragraph is
:- awesome.
OUTPUT
<p>My paragraph is awesome.</p>

Example 1

INPUT
:h1 Header 1
:p Just a :b[paragraph].
OUTPUT
<h1>Header 1</h1>
<p>Just a <b>paragraph</b>.</p>

Example 2

In this example we use SunSed tag <s:youtube> to embed a youtube video on our website.

INPUT
:s:youtube https://www.youtube.com/watch?v=rOCgK7s1gHI
RESULT

You can also create an alias for <s:youtube> and use the alias name instead. In the following example we create an alias yt and use that tag instead of <s:youtube>.

INPUT
<s:alias tag="s:youtube" as="yt" />
:yt https://www.youtube.com/watch?v=rOCgK7s1gHI
RESULT