all repos — h3rald @ 60c3667cfdf873f1d60f4049aa82841c484ddc81

The source code of the h3rald.com web site.

contents/subweb/subhtml.md

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
-----
id: subhtml 
title: SubHTML Specification
content-type: page
-----
{#element => &rarr; <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/$1">&lt;$1&gt;</a>#}

{#attribute => &rarr; <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/$1">$1</a>#}

> 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](https://datatracker.ietf.org/doc/html/rfc2119.html).

### Rationale

This is a rather informal specification for the [SubWeb](/subweb/) HTML subset, and aims to aid users who want to create SubWeb-compliant web pages.

Note that this specification:

- only focuses on the elements, attribute, and structure that would be REQUIRED to be supported by a hypothetical SubWeb-compliant web browser.
- does not includes elements, attributes, values, and features that MAY still be used in a SubWeb-compliant page because they degrade gracefully if support is not implemented. If an element is not listed, it doesn't necessarily mean that it is not permitted.
- does not include elements that are *not supported* because against SubWeb's own core philosophy like the `<object>` and `<frame>` elements.
- contains links to the Mozilla Developer Network [HTML Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference) to help users who wants to learn more about a specific element or attribute. Note however that not every aspect of linked elements or attribute MAY be supported or not permitted in SubWeb documents.

### Document Structure and Metadata

A SubHTML document MUST be structured using respecting the following tag hierarchy:

```html
<!DOCTYPE html>
<html>
  <head>
    <title>A SubWeb web site</title>
    <base href="/" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="/styles.css">
  </head>
  <body>
    <!-- document content goes here -->
  </body>
</html>
```

#### DOCTYPE

A document MUST have the following DOCTYPE declaration before the `<html>` element:

```html
<!DOCTYPE html>
```

#### Comments

A document MAY contain comments delimited by `<!--` and `-->`, which can be placed within any elements and span multiple lines.

#### html

A document MUST be wrapped in a single `<html>` element.

{#element||html#}

#### head

This element defines the header of the document and MAY contain metadata and links to external stylesheets.

{#element||head#}

#### title

Defines the title of the document, to be displayed in the browser title bar or the tab displaying the page; it can only contain text.

{#element||title#}

#### link

{#element||link#}

#### body

{#element||body#}

### Block Elements

#### blockquote

#### br

#### div

#### h1, h2, h3, h4, h5, h6

#### hr

#### img

#### p

#### pre

#### small

#### sub

#### sup


### Inline Elements

#### a

#### b

#### code

#### em

#### i 

#### span

#### strong


### Lists

#### dd

#### dl

#### dt

#### li

#### ol

#### ul


### Forms

#### button

#### form

#### input 

#### label

#### option

#### select 

#### textarea


### Tables

#### table

#### td

#### th

#### tr

### Common Attributes

#### class 

Specifies one or more CSS class names for styling the element.

#### id 

Defines a unique identifier for the element within the document.

#### title 

Provides advisory information displayed as a tooltip.