Versions Compared

Key

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

...

In this code template, CLASS refers to the value of the Class variable, STYLE to the value of the Style variable, and CONTENT to the value of the Content variable in the div(Content, Class, Style, Html) query. All of these variables need to be fully instantiated to generate HTML code that is returned in the output argument Html.

Many Bootstrap components are classes that can be used by means of the div tag. These include, for example, the container, jumbotron, alert, progress bar, spinner, card classes,

span tag

The span tag is an inline element that is commonly used to style HTML content. We have added a span/3 predicate span(Content, Style, Html) that just does that and nothing else. An example of a span tag that can be useful is to style the content and change the font family that is used within some HTML content:

...

The span tag has other uses too. It can be used for adding Bootstrap badges and borders to elements, for example. We have also used it , for example, to set setting the value of a button in the template we used for defining the button/4 predicate.

...

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.

...