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: a, base, meta, link, h1-h6, span, br, area, img, video, p, ul, ol, li, html, head, title, body, and style.

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.

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.

Example:

<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.

Example:

<p>This is a paragraph.</p>

5.3 Headings

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>

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.

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>

5.5 Links and Resources

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>

5.6 Content Grouping

The span tag is a generic container for grouping content.

Example:

<span> <p>A paragraph inside a span.</p> </span>

5.7 Images

The img tag embeds an image into the document.

Example:

<img src="image.jpg" alt="Image description">

5.8 Video and Graphics

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>

5.9 Styling

The style tag is used to include style information for the document.

Example:

<style> p { color: red; } </style>

6. Conformance

Documents that use any HTML elements outside the specified STML elements MUST NOT be considered conforming STML documents.

7. Future Work

Future specifications MAY consider the addition of other minimal HTML elements based on the evolution of web standards and community feedback.

8. Security Considerations

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.

9. Acknowledgments

This document was created based on the need for a simplified markup language inspired by the comprehensive work of the HTML Working Group.

10. Comprehensive Example

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>