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.
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.
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.
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.
The STML syntax is a subset of the HTML5 language and incorporates the following elements:
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>
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>
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>
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>
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>
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>
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>
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>
The details
and summary
elements allow for collapsible content.
<details>
<summary>Click to expand</summary>
<p>Hidden content revealed!</p>
</details>
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.