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: a, base, meta, link, h1-h6, span, br, area, img, video, p, ul, ol, li, html, head, title, body, and style.
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.
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.
Example:
<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.
Example:
<p>This is a paragraph.</p>h1 to h6 tags are used for headings, with h1 being the highest and h6 the lowest level.
Example:
<h1>Main Heading</h1> <h2>Subheading</h2>ul, ol, and li are used for lists. ul defines an unordered list, ol an ordered list, and li a list item.
Example:
<ul> <li>Unordered item 1</li> <li>Unordered item 2</li> </ul> <ol> <li>Ordered item 1</li> <li>Ordered item 2</li> </ol>The a, base, meta, link, and area tags manage links and resources. a defines a hyperlink, base specifies a base URL for all relative URLs in the page, meta specifies metadata about the HTML document, link defines a resource reference, and area defines an area inside an image map.
Example:
<head> <base href="https://example.com/"> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a href="page.html">Link text</a> <img src="map.jpg" usemap="#mapname" alt="Description"> <map name="mapname"> <area shape="rect" coords="0,0,50,50" href="destination.html" alt="Region"> </map> </body>The span tag is a generic container for grouping content.
Example:
<span> <p>A paragraph inside a span.</p> </span>The img tag embeds an image into the document.
Example:
<img src="image.jpg" alt="Image description">The video tag is used for embedding video content.
Example:
<video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </video>The style tag is used to include style information for the document.
Example:
<style> p { color: red; } </style>Documents that use any HTML elements outside the specified STML elements MUST NOT be considered conforming STML documents.
Future specifications MAY consider the addition of other minimal HTML elements based on the evolution of web standards and community feedback.
Since STML strictly limits the HTML elements that can be used, it can significantly reduce the attack surface for security exploits commonly found in complex HTML documents.
This document was created based on the need for a simplified markup language inspired by the comprehensive work of the HTML Working Group.
Here is an example of a full STML document that includes each element:
<html> <head> <base href="https://www.example.com/" target="_blank"> <meta charset="UTF-8"> <meta name="description" content="Example Document"> <link rel="stylesheet" href="styles.css"> <title>STML Example</title> <style> body { background-color: lightgrey; } h1 { color: navy; } p { color: black; } </style> </head> <body> <h1>STML Example Page</h1> <p>This is a paragraph.</p> <p>Another paragraph following a line break.<br>Line after break.</p> <ul> <li>Unordered list item</li> </ul> <ol> <li>Ordered list item</li> </ol> <a href="another_page.html">Link to another page</a> <span> <img src="image.jpg" alt="Example image" usemap="#imageMap"> <map name="imageMap"> <area shape="rect" coords="0,0,50,50" href="image_area_link.html" alt="Image Area"> </map> </span> <video width="320" height="240" controls> <source src="movie.mp4" type="video/mp4"> Your browser does not support the video tag. </video> </body> </html>