Lists
September 17, 2001
In HTML there were three different types of elements for defining lists, and in Curl this is no different.
In HTML lists are defined using a mish-mash of attribute settings of the <ul> (unordered list), <ol>
(ordered list), and the <dl> (definition list) elements.
Instead Curl relies on three different formats:
- itemize for bulleted lists
- enumerate for numbered lists
- definition-list for definition lists
Let's have a brief look at all three now.
Bulleted Lists
In HTML you would use the <ul> element to create a list of bullets. Each item on the list would be
represented by the <li> (list item) element as follows:
<ul>
<li>Point 1</li>
<li>Point 2</li>
<li>Point 3</li>
</ul>
Bulleted lists in Curl work in a very similar way. They are created using the itemize format. The
itemize format in turn contains a series of expressions that are surrounded by expressions defined
using the item format. The item format is used to create the different elements within the list. The two
formats have the following syntax:
{itemize
{item ...}
{item ...}
{item ...}
}
In addition to this, there is also a marker option that can be specified with the itemize format to define
the particular style of bullet you wish to use in the list, once more this must be followed by a comma:
{itemize marker="bullet type",
{item ...}
{item ...}
{item ...}
}
Possible values for the marker option are any character that is supported by the browser. For instance
you could specify the marker type as o, if you wanted each item in the list bulleted with an 'o'. For a
three item in the list, we could use the following code:
|| bullets.curl
{curl 1.7 applet}
{applet license = "development"}
{itemize marker="o",
{item Bullet point 1}
{item Bullet point 2}
{item Bullet point 3}
}
This would display as follows in the browser window:
Bullet points can be incorporated into other formats such as the text or paragraph formats just by
placing them within these other formats.
Numbered Headings
Early Adopter Curl
Numbered Lists
|