Next Previous Up Top Contents Index

WebMaker User Guide

12.12.5 HTML markup functions

Most of the functions listed below accept an optional argument named class. For information about the class argument and the default values for it, see Section 12.4, "WML support for CSS".

address(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup of string as ADDRESS.

For example:

address("MR") --> "<ADDRESS CLASS=classname>MR</ADDRESS>"

break(class:classname)

Parameters

classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup for line break.

For example:

break() --> "<BR CLASS=classname>"

button(string1, url, string2, class:classname)

Parameters

string1 and string2 are character strings, and url is a URL. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup for the hypertext link with the first parameter as anchor text pointing to the address specified by url. If url is "", then string2 is used as anchor text. If string2 is not specified, and url is "", then no button is returned.

For example:

filename(up) --> "doc_9.html"
button("[Up]",filename(up)) --> 
   "<A HREF="doc_9.html" class:classname>[Up]</A>" 
filename(next) --> ""
button("[Next]",filename(next),"[Next]") --> "[Next]" 

See also link(string,url, class:classname).

center(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup of string within the CENTER HTML markup.

For example:

center("toto") --> "<center class:classname>toto</center>"

comment(string)

Parameters

string is a character string.

Returns the HTML markup of string as an HTML comment.

For example:

comment("toto") --> "<!-- toto -->"

element(tagname, string, class:classname)

Parameters

tagname is a string that names an HTML command in which to enclose the string that is the second argument. string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup of string within the HTML markup named tagname. The element function is useful for creating text in HTML markup that is not otherwise supported in WebMaker (which might include browser-specific extensions). You can use element to produce any markup that uses the simple syntax: <tagname>text</tagname>.

For example, you can use element to produce the blink command, which WebMaker does not have a special function to produce:

element("blink" "toto") --> "<blink class:classname>toto</blink>"

glossterm(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns HTML markup of string as a Definition Term (within a Definition List).

For example:

glossterm("PT"); --> "<DT CLASS=classname>PT" 

See also glossdescription(string, class:classname).

glossdescription(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns HTML markup of string as a Definition Description (within a Definition List).

For example:

glossdescription("Programming Techniques") 
--> "<DD CLASS=classname>Programming Techniques" 

See also glossterm(string, class:classname).

heading(level, string, class:classname)

Parameters

level is an integer between 1 and 6. string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns HTML markup of string as heading of level.

For example:

heading(1,"Chapter 1") --> "<H1 CLASS=classname>Chapter 1</H1>" 

hrule(class:classname)

Parameters

classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup for horizontal rule.

For example:

hrule() --> "<HR CLASS=classname>"

image(url, keyword-args)

Parameters

url is a URL, which can also be a pathname of an image file. The keyword arguments are all optional, and may be given in any order. For information about the meaning of these keywords arguments, see the HTML specification. The keyword arguments include:

align:alignment (where alignment is top, bottom, middle, left, or right)
width:integer
height:integer
alt:string (where string is the alternate text for the image)
border:integer
hspace:integer
vspace:integer
usemap:string (where string is a URL for an image map)
ismap:ismap
class:classname (where classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns HTML markup for the image file specified by url with the provided keyword arguments. For example:

image("next.gif", align:bottom, alt:"Next") --> 
"<IMG ALIGN="BOTTOM" ALT="Next" SRC="next.gif" CLASS=classname>"

The syntax of image changed in WebMaker 3.0. The old syntax is still supported for compatibility with previous releases. The old syntax is:

image(url, alignment, class:classname)

The alignment argument is top, bottom, middle, left, or right. For example:

image("example.gif",bottom) --> 
"<IMG ALIGN="BOTTOM" SRC="example.gif" CLASS=classname>"

link(string,url, class:classname)

Parameters

string is a character string. url is a URL. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup for the hypertext link with string as anchor text pointing to the address specified by url.

For example:

link("CERN","http://www.cern.ch/") -->
         "<A HREF="http://www.cern.ch/" CLASS=classname>CERN</A>"

See also button(string1, url, string2, class:classname).

listitem(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup for string as a list item (within a list environment).

For example:

listitem("item 1") --> "<LI CLASS=classname>item 1"

paragraph(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup for string as a simple paragraph.

For example:

paragraph("Some text") --> "<P CLASS=classname>Some text</P>"

span(string, class:classname)

Parameters

string is a character string. classname is a string that names the CSS class of the HTML elements produced by this function. The class argument is optional.

Returns the HTML markup of string within the SPAN HTML markup.

For example:

span("toto", class:doggy) --> "<span class:doggy>toto</span>"