Elements and attributes

So far your application has only been text. Let's add some other content and style.

The "lustre/html" module is used to construct HTML elements. These functions (usually) take two arguments. The first argument is a list of attributes and the second a list of child elements.

Some elements (such as the "img" element) are not permitted to contain any child elements. In those cases only one argument, the list of attributes, is used to create the element.

The "lustre/attributes" module contains functions for attributes such as style and src as shown here.

Try changing the style from "red" to "blue" or using the other "img_src"

All the different HTML elements and attributes that are availabile is too large a topic for this guide. Mozilla has great resources if you want to find out more.