# garden.lexicon.rational-mastodon.html1

> Published by [chrisshank.com](https://lexicon.garden/identity/did:plc:zcanytzlaumjwgaopolw6wes)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:zcanytzlaumjwgaopolw6wes/garden.lexicon.rational-mastodon.html1)
- [Documentation](https://lexicon.garden/lexicon/did:plc:zcanytzlaumjwgaopolw6wes/garden.lexicon.rational-mastodon.html1/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:zcanytzlaumjwgaopolw6wes/garden.lexicon.rational-mastodon.html1/examples)

## Definitions

### `garden.lexicon.rational-mastodon.html1`

**Type**: `record`

Root of the HTML document or fragment.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |
| `children` | `array` | Yes |  |

### `garden.lexicon.rational-mastodon.html1#text`

**Type**: `object`

An HTML text node (https://developer.mozilla.org/en-US/docs/Web/API/Text)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |
| `value` | `string` | Yes |  |

### `garden.lexicon.rational-mastodon.html1#comment`

**Type**: `object`

An HTML comment node (https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Comments)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |
| `value` | `string` | Yes |  |

### `garden.lexicon.rational-mastodon.html1#docType`

**Type**: `object`

An HTML Doctype node (https://developer.mozilla.org/en-US/docs/Glossary/Doctype)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |

### `garden.lexicon.rational-mastodon.html1#element`

**Type**: `object`

An HTML element node (https://developer.mozilla.org/en-US/docs/Web/API/Element)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `type` | `string` | Yes |  |
| `tagName` | `string` | Yes |  |
| `children` | `array` | Yes |  |
| `attributes` | `array` | Yes |  |

### `garden.lexicon.rational-mastodon.html1#attribute`

**Type**: `object`

An HTML attribute (https://developer.mozilla.org/en-US/docs/Glossary/Attribute)

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `name` | `string` | Yes |  |
| `value` | `string` | Yes |  |

## Raw Schema

```json
{
  "id": "garden.lexicon.rational-mastodon.html1",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "type",
          "children"
        ],
        "properties": {
          "type": {
            "enum": [
              "root"
            ],
            "type": "string"
          },
          "children": {
            "type": "array",
            "items": {
              "refs": [
                "#docType",
                "#element",
                "#text",
                "#comment"
              ],
              "type": "union"
            }
          }
        }
      },
      "description": "Root of the HTML document or fragment."
    },
    "text": {
      "type": "object",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "enum": [
            "text"
          ],
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "description": "An HTML text node (https://developer.mozilla.org/en-US/docs/Web/API/Text)"
    },
    "comment": {
      "type": "object",
      "required": [
        "type",
        "value"
      ],
      "properties": {
        "type": {
          "enum": [
            "comment"
          ],
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "description": "An HTML comment node (https://developer.mozilla.org/en-US/docs/Web/HTML/Guides/Comments)"
    },
    "docType": {
      "type": "object",
      "required": [
        "type"
      ],
      "properties": {
        "type": {
          "enum": [
            "doctype"
          ],
          "type": "string"
        }
      },
      "description": "An HTML Doctype node (https://developer.mozilla.org/en-US/docs/Glossary/Doctype)"
    },
    "element": {
      "type": "object",
      "required": [
        "type",
        "tagName",
        "attributes",
        "children"
      ],
      "properties": {
        "type": {
          "enum": [
            "element"
          ],
          "type": "string"
        },
        "tagName": {
          "type": "string"
        },
        "children": {
          "type": "array",
          "items": {
            "refs": [
              "#element",
              "#text",
              "#comment"
            ],
            "type": "union"
          }
        },
        "attributes": {
          "type": "array",
          "items": {
            "ref": "#attribute",
            "type": "ref"
          }
        }
      },
      "description": "An HTML element node (https://developer.mozilla.org/en-US/docs/Web/API/Element)"
    },
    "attribute": {
      "type": "object",
      "required": [
        "name",
        "value"
      ],
      "properties": {
        "name": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "description": "An HTML attribute (https://developer.mozilla.org/en-US/docs/Glossary/Attribute)"
    }
  },
  "lexicon": 1
}
```
