Table of Contents | ||||
---|---|---|---|---|
|
...
Note |
---|
It is very important to use the right quote symbol in your code. For example, |
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. |
...