Skip to content

HTML#

The HyperText Markup Language (HTML) is the standard for all documents designed for a web browser. It consists of a series of elements defining its structure and the layout of its content.

Story Format Layout#

Each story format handles its own layout and HTML structure. While CSS can be used to style its elements, it is often recommended to use any existing macros for this purpose in a story format, if available.

Twine 2 HTML#

All data of a Twine 2 story is stored as a series of HTML elements within a page according to the HTML Output Specification.

Example:

<tw-storydata>
  <style
    role="stylesheet"
    id="twine-user-stylesheet"
    type="text/twine-css">
  </style>
  <script
    role="script"
    id="twine-user-script"
    type="text/twine-javascript">
  </script>
  <tw-tag
    name="tagName"
    color="orange">
  </tw-tag>
  <tw-passagedata
        pid="1"
        name="Start"
        tags="tag1 tag2"
        position="102,99"
        size="100,100">
    Some content
    </tw-passagedata>
</tw-storydata>