Basically, HTML has two kinds of components: HTML elements and HTML environments. An HTML element has the form <NAME Attributes > were NAME is the name of the element and Attributes is a (possibly empty) sequence of attributes, each of them being either an attribute name or an attribute assignment as name="Value".
An HTML environment has the form <NAME Attributes >
Text </NAME>
were NAME is the name of the
environment an Attributes has the same form as before.
The general Prolog structures that represent these two HTML constructions are:
img$[src='images/map.gif',alt='A map',ismap]
is translated into the HTML source
<img src="images/map.gif" alt="A map" ismap>
Note that HTML is not case-sensitive, so we can use lower-case
atoms.
address('clip@dia.fi.upm.es')
is translated into the HTML source
<address>clip@dia.fi.upm.es</address>
a([href='http://www.clip.dia.fi.upm.es/'],'Clip home')
represents the HTML source
<a href="http://www.clip.dia.fi.upm.es/">Clip home</a>
In principle, (almost) any HTML construction can be represented with these structures, but for the sake of simplifying HTML creation, more specific structures were designed.