smolweb HTML specification
This is a proposed specification for HTML elements (tags) and their attributes.
The goal is to mix the best of old and recent HTML versions: a simple syntax usable by lightweight or old browsers and the recent ones, and respecting accessibility.
Origin of this specification
This subset is inspired by a previous work proposed by W3C: the XHTML Basic
The XHTML Basic document type includes the minimal set of modules required to be an XHTML host language document type, and in addition it includes images, forms, basic tables, and object support. It is designed for Web clients that do not support the full set of XHTML features; for example, Web clients such as mobile phones, PDAs, pagers, and set top boxes. The document type is rich enough for content authoring.
For a better compatibility, it is not a good idea to specify the XHTML Basic 1.1 DTD in the doctype for smolwebsites.
Some deprecated tags (accronym, big, tt) have been removed from this list. Object and param tags have been banned to avoid inclusion of specific code such as Java applets.
As specify in Guidelines, semantics tags issued in more recent HTML versions have been added to propose a better accessibility.
HTML elements
*This work is in progress… all description of these elements are not written yet. For missing definitions, refer to Mozilla Developer Network documentation
Structural subset
Separate the HTML code in different structures, there is always one, and only one, occurrence of them in an HTML page
<html>
the root or top-level element of the HTML document<head>
the machine-readable information (metadata) about the document<title>
the document’s title that is shown in a browser’s title bar or tab name<body>
the content of the HTML document
Semantic subset
Identify the different sections or area in the body of the document
<header>
an introductory content<footer>
a footer for its nearest ancestor sectioning content<main>
the dominant content of the document<nav>
a section of a page whose purpose is to provide navigation links<section>
a generic standalone section of the document<article>
a self-contained composition in the document (distributable or reusable)<aside>
a portion of a document which is indirectly related to the document’s main content<details>
a disclosure widget in which information is not visible directly<summary>
inside a<details>
element, summarize its content<figure>
a self-contained content, potentially with an optional caption<figcaption>
a caption or legend describing the rest of the contents of its parent<figure>
element<data>
a given piece of content with a machine-readable translation
Textual subset
Defines the level or the type of content in the document.
<abbr>
an abbreviation or acronym<address>
contact information for a person or people, or for an organization<blockquote>
an extended quotation<br>
a line break in text<cite>
mark up the title of a cited creative work<code>
a short fragment of computer code<dfn>
the term being defined within the context of a definition phrase or sentence<div>
a generic container for flow content<em>
text having stress emphasis<h1>
the higher level of section headings<h2>
second level of section headings<h3>
third level of section headings<h4>
forth level of section headings<h5>
fifth level of section headings<h6>
the lower level of section headings<kbd>
inline text denoting textual user input from a keyboard<p>
a paragraph<pre>
a preformatted text which is to be presented exactly as written<q>
a short inline quotation<samp>
inline sample (or quoted) output from a computer program<span>
a generic inline container for phrasing content<strong>
content having strong importance, seriousness, or urgency<var>
the name of a variable in a mathematical expression or a programming context
Hypertextual subset
Link with other web resources.
<a>
a hyperlink to web pages, files, email addresses, locations… or a link’s destination
Listing subset
List representation of the content such as bulleted or ordered lists
<dl>
a description list<dt>
a term in a description or definition list<dl>
<dd>
the description, definition, or value for the preceding<dt>
<ol>
an ordered list of items<ul>
an unordered list of items (bulleted list)<li>
an item in an<ol>
or<ul>
list
Forms subset
Allow the user to input or modify data fields in the document and to submit them to the server.
<button>
an interactive element activated by a user, performing an action<fieldset>
a group of several controls in a<form>
<form>
a document section containing interactive controls for submitting information<input>
interactive controls accepting data from the user<label>
a caption for an item<legend>
a caption for the content of its parent<fieldset>
<select>
a control that provides a menu of options<optgroup>
a grouping of options within a<select>
<option>
an item contained in a<select>
or an<optgroup>
<textarea>
a multi-line plain-text editing control
Basic Table subset
Represent tabular data (think about spreadsheets notion).
<caption>
the caption (or title) of a<table>
<table>
two-dimensional tabular data<td>
a cell of a<table>
that contains data<th>
a cell as the header of a group of<table>
cells<tr>
a row of cells in a<table>
Media subset
<audio>
an element embedding an audio sequence into the document<img>
an element embedding an image into the document<source>
nested in audio or video elements to propose multiple formats<video>
an element embedding a video sequence into the document
Presentation subset
Historically used for styling the content, these elements have, now, a more semantic role.
<b>
content requiring the reader’s attention<hr>
a thematic break between paragraph-level elements<i>
text that is set off from the normal text for some reason<small>
side-comments, small print<sub>
text which should be displayed as subscript for solely typographical reasons<sup>
text which is to be displayed as superscript for solely typographical reasons
Metainformation and linking subset
Information included in the <head>
of the document.
<meta>
metadata that cannot be represented by other HTML meta-related elements<link>
specifies relationships between the current document and an external resource<base>
specifies the base URL to use for all relative URLs in a document<script>
embeds JavaScript code, this code must not access resources out of the same host<style>
embeds CSS declarations relative to the elements of the document