This version of Learn Prolog Now! embeds SWISH,
SWI-Prolog for SHaring.
The current version rewrites the Learn Prolog Now! HTML on the fly, recognising
source code and example queries. It is not yet good at recognising the relations
between source code fragments and queries. Also Learn Prolog Now! needs some
updating to be more compatible with SWI-Prolog. All sources are on GitHub:

Chapter 1 Facts, Rules, and Queries

This chapter has two main goals:

To give some simple examples of Prolog programs. This will introduce us to the three basic constructs in Prolog: facts, rules, and queries. It will also introduce us to a number of other themes, like the role of logic in Prolog, and the idea of performing unification with the aid of variables.

To begin the systematic study of Prolog by defining terms, atoms, variables and other syntactic concepts.