Displaying Text in Lists

The list procedures display lists. To use these procedures, call the appropriate procedure before the list is generated. After the list is generated, call the corresponding end procedure.

The following list procedures are available:

List Type Beginning Procedure End Procedure

Definition (terms and their definitions)

html_dl

html_dl_end

Directory

html_dir

html_dir_end

Menus

html_menu

html_menu_end

Ordered (numbered or lettered)

html_ol

html_ol_end

Unordered (bulleted)

html_ul

html_ul_end

To display a list, except for the definition list, call the appropriate list procedure before starting the output. Call html_li to identify each item in the list; you can also call html_li_end for completeness. After specifying the output, call the corresponding end procedure.

The following code example displays an ordered list:

do html_ol('')
do html_li('')
print 'First item in list' (1,1)
do html_li_end 
do html_li('')
print 'Second item in list' (+1,1)
do html_li_end 
do html_li('')
print 'Last item in list' (+1,1)
do html_li_end 
do html_ol_end

To display a definition list, call html_dl before starting the output. Call html_dt to identify a term and html_dd to identify a definition. After specifying the output, call html_dl_end. You can also call html_dd_end and html_dt_end for completeness.

The following code example displays a definition list:

do html_dl('')
do html_dt('')
print 'A daisy' (1,1)
do html_dt_end 
do html_dd('')
print 'A sweet and innocent flower' (+1,1)
do html_dd_end 
do html_dt('')
print 'A rose' (+1,1)
do html_dt_end 
do html_dd('')
print 'A very passionate flower' (+1,1)
do html_dd_end 
do html_ol_end