Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel7

...

Note

It is very important to use the right quote symbol in your code. For example, ‘quote’ is not the same as the 'code' quote. You need to make sure you use the straight apostrophe quote ' in code.

There are many simply tags where it is easiest to simply put them between single quotes to create a Prolog atom for generating the corresponding HTML code. Similarly, single tags such as '<br>' for breaking a line and '<hr>' for adding a horizontal line can be simply generated by quoting them.

Generating more complicated HTML elements

Most HTML tag pairs can be simply generated by using a start and end tag and by adding some text to create the corresponding HTML. For example, <button>Start</Button> can be used to generate a simple button saying Start. However, to unleash the full power of the HTML language, it is more often than not useful to modify the type or style of an HTML element by adding additional attributes in the form of name="value" to the start tag. For example, to create a large button

By means of these and generate with the rule. The HTML code is represented in Bootstrap format, which is also clearly illustrated by examples below or on Bootstrap's documentation website (Bootstrap Documentation).

Note

Prolog Advice: To manipulate strings and atoms in Prolog it is useful to look at documentation of the following built-in functions: atomic_list_concat, atom_concat, string_concat, append, and maplist here: https://www.swi-prolog.org/. The predicate applyTemplate is a defined predicate that will be explained below.

...