Simplified Text Markup Language (STML)

1. Status of this Memo

This document specifies an Internet standards track protocol for the Internet community and requests discussion and suggestions for improvements. Please refer to the current edition of the "Internet Official Protocol Standards" (STD 1) for the standardization state and status of this protocol. Distribution of this memo is unlimited.

2. Abstract

This document describes Simplified Text Markup Language (STML), a reduced complexity version of HTML that strictly utilizes a limited subset of HTML elements. The allowed elements are: a, meta, h1-h3, br, p, ul, ol, li, html, head, title, body, article, section, header, footer, nav, blockquote, hr, pre, b, code, i, em, strong, mark, q, s, small, sub, sup, u, summary, details, and all table-related elements.

3. Conventions Used in This Document

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.

4. Introduction

STML's main goal is to offer a straightforward, minimalist web content structure, focusing solely on essential content structuring and styling elements. By limiting the number of permissible elements, STML aims to reduce complexity in web development and ensure consistency across web documents.

5. Syntax

The STML syntax is a subset of the HTML5 language and incorporates the following elements:

5.1 Document Structure

The html, head, title, and body tags frame the basic document structure. The html tag contains the entire HTML document, head contains meta-information about the document, title specifies a title for the document, and body contains the document's content.

<html>
    <head>
        <title>Document Title</title>
    </head>
    <body>
        <!-- Document content goes here -->
    </body>
</html>

5.2 Text Formatting

The p and br tags are used for formatting text. p defines a paragraph, and br inserts a line break.

<p>This is a paragraph.</p>
<p>This is another paragraph with a line break.<br>This is after the line break.</p>

5.3 Headings

h1 to h3 tags are used for headings, with h1 being the highest and h3 the lowest level allowed in STML.

<h1>Main Heading</h1>
<h2>Subheading</h2>
<h3>Sub-subheading</h3>

5.4 Lists

ul, ol, and li are used for lists. ul defines an unordered list, ol an ordered list, and li a list item.

<ul>
    <li>Unordered item 1</li>
    <li>Unordered item 2</li>
</ul>

<ol>
    <li>Ordered item 1</li>
    <li>Ordered item 2</li>
</ol>

5.5 Tables

STML allows all table-related elements, including table, thead, tbody, tfoot, tr, th, and td. These are used to create structured tabular data.

<table>
    <thead>
        <tr>
            <th>Header 1</th>
            <th>Header 2</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Data 1</td>
            <td>Data 2</td>
        </tr>
    </tbody>
</table>

5.6 Semantic Elements

STML supports semantic elements such as article, section, header, footer, and nav. These improve document structure and accessibility.

<article>
    <header>
        <h1>Article Title</h1>
    </header>
    <section>
        <p>This is a section inside an article.</p>
    </section>
    <footer>
        <p>Article Footer</p>
    </footer>
</article>

5.7 Blockquote and Quotes

The blockquote and q elements are used for quotations.

<blockquote>
    This is a blockquote.
</blockquote>

<p>He said, <q>This is an inline quote.</q></p>

5.8 Inline Formatting

Inline elements like b, i, em, strong, mark, s, small, sub, sup, and u are allowed.

<p><b>Bold</b>, <i>Italic</i>, <em>Emphasis</em>, <strong>Strong</strong>, 
<mark>Highlighted</mark>, <s>Strikethrough</s>, <small>Small text</small>, 
<sub>Subscript</sub>, <sup>Superscript</sup>, <u>Underlined</u></p>

5.9 Details and Summary

The details and summary elements allow for collapsible content.

<details>
    <summary>Click to expand</summary>
    <p>Hidden content revealed!</p>
</details>

6. Security Considerations

STML significantly reduces the risk of XSS and styling attacks by prohibiting inline styles, external stylesheets, and potentially dangerous elements like img and video. This approach ensures a more secure and predictable rendering environment.

7. References


©2022-2025 stml.dev. All rights reserved.