executable HTML is a set of custom elements, which help the author of HTML content prescribe the way pieces of HTML are inserted into the document, without necessitating the use of JavaScript by the author.
Below, you can find two examples:
A program producing output in an infinite loop, and
A program producing a conditional questionnaire, with elements that expect synchronous input from the user
Example 1
This example uses executable HTML to replicate the famous Commodore 64 BASIC oneliner:
10 PRINT CHR$(205.5+RND(1)); : GOTO 10An example of the running c64 program can be found at this youtube video. Done in executable HTML, this could be written as:
<aa-sequence> <aa-function-random min="1" max="2" name="rnd"><aa-function-random> <aa-choose> <aa-when test="rnd==1">m<aa-when> <aa-otherwise>n<aa-otherwise> <aa-choose> <aa-jump goto="rnd"><aa-jump> <aa-sequence>The following CodePen demonstrates it running:
See the Pen 10 PRINT CHR$(205.5+RND(1)); : GOTO 10 by b3008 (@b3008) on CodePen.
Example 2
This example illustrates how a possible part of a questionnaire could be made, including the generation of a random value, the choice of a screen to present to the user based on that, and a "thank you" screen as a final step in the sequence.
See the Pen questionnaireDemo by b3008 (@b3008) on CodePen.
The repository for executable HTML can be found at https://github.com/b3008/executable_HTML