Class HtmlHelper
Html Helper class for easy use of HTML widgets.
HtmlHelper encloses all methods needed while working with HTML pages.
- Object
- Overloadable
- Helper
- AppHelper
- HtmlHelper
Link: http://book.cakephp.org/1.3/en/The-Manual/Core-Helpers/HTML.html#HTML
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: view/helpers/html.php
Properties summary
-
$__docTypes
publicarray
Document type definitions -
$__includedScripts
publicarray
Names of script files that have been included once -
$_crumbs
publicarray
Breadcrumbs. -
$_scriptBlockOptions
publicarray
Options for the currently opened script block buffer if any. -
$tags
publicarray
html tags used by this helper.
Inherited Properties
Method Summary
-
__nestedListItem() public
Internal function to build a nested list (UL/OL) out of an associative array. -
addCrumb() public
Adds a link to the breadcrumbs array. -
charset() public
Returns a charset META-tag. -
css() public
Creates a link element for CSS stylesheets. -
div() public
Returns a formatted DIV tag for HTML FORMs. -
docType() public
Returns a doctype string. -
getCrumbs() public
Returns the breadcrumb trail as a sequence of »-separated links. -
image() public
Creates a formatted IMG element. If
$options['url']
is provided, an image link will be generated with the link pointed at$options['url']
. This method will set an empty alt attribute if one is not supplied. -
link() public
Creates an HTML link. -
meta() public
Creates a link to an external resource and handles basic meta tags -
nestedList() public
Build a nested list (UL/OL) out of an associative array. -
para() public
Returns a formatted P tag. -
script() public
Returns one or many<script>
tags depending on the number of scripts given. -
scriptBlock() public
Wrap $script in a script tag. -
scriptEnd() public
End a Buffered section of Javascript capturing. Generates a script tag inline or in
$scripts_for_layout
depending on the settings used when the scriptBlock was started -
scriptStart() public
Begin a script block that captures output until HtmlHelper::scriptEnd() is called. This capturing block will capture all output between the methods and create a scriptBlock from it.
-
style() public
Builds CSS style data from an array of CSS properties -
tableCells() public
Returns a formatted string of table rows (TR's with TD's in them). -
tableHeaders() public
Returns a row of formatted and named TABLE headers. -
tag() public
Returns a formatted block tag, i.e DIV, SPAN, P.
Method Detail
__nestedListItem() public ¶
__nestedListItem( array $items , array $options , array $itemOptions , string $tag )
Internal function to build a nested list (UL/OL) out of an associative array.
Parameters
- array $items
- Set of elements to list
- array $options
- Additional HTML attributes of the list (ol/ul) tag
- array $itemOptions
- Additional HTML attributes of the list item (LI) tag
- string $tag
- Type of list tag to use (ol/ul)
Returns
The nested list element
See
addCrumb() public ¶
addCrumb( string $name , string $link = null , mixed $options = null )
Adds a link to the breadcrumbs array.
Parameters
- string $name
- Text for link
- string $link optional null
- URL for link (if empty it won't be a link)
- mixed $options optional null
- Link attributes e.g. array('id'=>'selected')
See
charset() public ¶
charset( string $charset = null )
Returns a charset META-tag.
Parameters
- string $charset optional null
The character set to be used in the meta tag. If empty, The App.encoding value will be used. Example: "utf-8".
Returns
A meta tag containing the specified character set.
Link
css() public ¶
css( mixed $path , string $rel = null , array $options = array() )
Creates a link element for CSS stylesheets.
Options
inline
If set to false, the generated tag appears in the head tag of the layout. Defaults to true
Parameters
- mixed $path
The name of a CSS style sheet or an array containing names of CSS stylesheets. If
$path
is prefixed with '/', the path will be relative to the webroot of your application. Otherwise, the path will be relative to your CSS path, usually webroot/css.- string $rel optional null
- Rel attribute. Defaults to "stylesheet". If equal to 'import' the stylesheet will be imported.
- array $options optional array()
- Array of HTML attributes.
Returns
CSS or tag, depending on the type of link.
Link
div() public ¶
div( string $class = null , string $text = null , array $options = array() )
Returns a formatted DIV tag for HTML FORMs.
Options
escape
Whether or not the contents should be html_entity escaped.
Parameters
- string $class optional null
- CSS class name of the div element.
- string $text optional null
String content that will appear inside the div element. If null, only a start tag will be printed
- array $options optional array()
- Additional HTML attributes of the DIV tag
Returns
The formatted DIV element
Link
docType() public ¶
docType( string $type = 'xhtml-strict' )
Returns a doctype string.
Possible doctypes:
- html4-strict: HTML4 Strict.
- html4-trans: HTML4 Transitional.
- html4-frame: HTML4 Frameset.
- xhtml-strict: XHTML1 Strict.
- xhtml-trans: XHTML1 Transitional.
- xhtml-frame: XHTML1 Frameset.
- xhtml11: XHTML1.1.
Parameters
- string $type optional 'xhtml-strict'
- Doctype to use.
Returns
Doctype string
Link
getCrumbs() public ¶
getCrumbs( string $separator = '»' , string $startText = false )
Returns the breadcrumb trail as a sequence of »-separated links.
Parameters
- string $separator optional '»'
- Text to separate crumbs.
- string $startText optional false
- This will be the first crumb, if false it defaults to first crumb in array
Returns
Composed bread crumbs
image() public ¶
image( string $path , array $options = array() )
Creates a formatted IMG element. If $options['url']
is provided, an image link will be
generated with the link pointed at $options['url']
. This method will set an empty
alt attribute if one is not supplied.
Usage
Create a regular image:
echo $html->image('cake_icon.png', array('alt' => 'CakePHP'));
Create an image link:
echo $html->image('cake_icon.png', array('alt' => 'CakePHP', 'url' => 'http://cakephp.org'));
Parameters
- string $path
- Path to the image file, relative to the app/webroot/img/ directory.
- array $options optional array()
- Array of HTML attributes.
Returns
completed img tag
Link
link() public ¶
link( string $title , mixed $url = null , array $options = array() , string $confirmMessage = false )
Creates an HTML link.
If $url starts with "http://" this is treated as an external link. Else, it is treated as a path to controller/action and parsed with the HtmlHelper::url() method.
If the $url is empty, $title is used instead.
Options
escape
Set to false to disable escaping of title and attributes.
Parameters
- string $title
- The content to be wrapped by tags.
- mixed $url optional null
- Cake-relative URL or array of URL parameters, or external URL (starts with http://)
- array $options optional array()
- Array of HTML attributes.
- string $confirmMessage optional false
- JavaScript confirmation message.
Returns
An
<a />
element.Link
meta() public ¶
meta( string $type , mixed $url = null , array $options = array() )
Creates a link to an external resource and handles basic meta tags
Options
inline
Whether or not the link element should be output inline, or in scripts_for_layout.
Parameters
- string $type
- The title of the external resource
- mixed $url optional null
- The address of the external resource or string for content attribute
- array $options optional array()
Other attributes for the generated tag. If the type attribute is html, rss, atom, or icon, the mime-type is returned.
Returns
A completed
<link />
element.Link
nestedList() public ¶
nestedList( array $list , array $options = array() , array $itemOptions = array() , string $tag = 'ul' )
Build a nested list (UL/OL) out of an associative array.
Parameters
- array $list
- Set of elements to list
- array $options optional array()
- Additional HTML attributes of the list (ol/ul) tag or if ul/ol use that as tag
- array $itemOptions optional array()
- Additional HTML attributes of the list item (LI) tag
- string $tag optional 'ul'
- Type of list tag to use (ol/ul)
Returns
The nested list
para() public ¶
para( string $class , string $text , array $options = array() )
Returns a formatted P tag.
Options
escape
Whether or not the contents should be html_entity escaped.
Parameters
- string $class
- CSS class name of the p element.
- string $text
- String content that will appear inside the p element.
- array $options optional array()
- Additional HTML attributes of the P tag
Returns
The formatted P element
Link
script() public ¶
script( mixed $url , mixed $options = array() )
Returns one or many <script>
tags depending on the number of scripts given.
If the filename is prefixed with "/", the path will be relative to the base path of your application. Otherwise, the path will be relative to your JavaScript path, usually webroot/js.
Can include one or many Javascript files.
Options
inline
- Whether script should be output inline or into scripts_for_layout.once
- Whether or not the script should be checked for uniqueness. If true scripts will only be included once, use false to allow the same script to be included more than once per request.
Parameters
- mixed $url
- String or array of javascript files to include
- mixed $options optional array()
- Array of options, and html attributes see above. If boolean sets $options['inline'] = value
Returns
String of <script />
tags or null if $inline is false or if $once is true and the file has been
included before.
Link
scriptBlock() public ¶
scriptBlock( string $script , array $options = array() )
Wrap $script in a script tag.
Options
safe
(boolean) Whether or not the $script should be wrapped ininline
(boolean) Whether or not the $script should be added to $scripts_for_layout or output inline
Parameters
- string $script
- The script to wrap
- array $options optional array()
- The options to use.
Returns
string or null depending on the value of
$options['inline']
Link
scriptEnd() public ¶
scriptEnd( )
End a Buffered section of Javascript capturing.
Generates a script tag inline or in $scripts_for_layout
depending on the settings
used when the scriptBlock was started
Returns
depending on the settings of scriptStart() either a script tag or null
Link
scriptStart() public ¶
scriptStart( array $options = array() )
Begin a script block that captures output until HtmlHelper::scriptEnd() is called. This capturing block will capture all output between the methods and create a scriptBlock from it.
Options
safe
Whether the code block should contain a CDATAinline
Should the generated script tag be output inline or in$scripts_for_layout
Parameters
- array $options optional array()
- Options for the code block.
Link
style() public ¶
style( array $data , boolean $oneline = true )
Builds CSS style data from an array of CSS properties
Usage:
{{{ echo $html->style(array('margin' => '10px', 'padding' => '10px'), true);
// creates 'margin:10px;padding:10px;' }}}
Parameters
- array $data
- Style data array, keys will be used as property names, values as property values.
- boolean $oneline optional true
- Whether or not the style block should be displayed on one line.
Returns
CSS styling data
Link
tableCells() public ¶
tableCells( array $data , array $oddTrOptions = null , array $evenTrOptions = null , boolean $useCount = false , boolean $continueOddEven = true )
Returns a formatted string of table rows (TR's with TD's in them).
Parameters
- array $data
- Array of table data
- array $oddTrOptions optional null
- HTML options for odd TR elements if true useCount is used
- array $evenTrOptions optional null
- HTML options for even TR elements
- boolean $useCount optional false
- adds class "column-$i"
- boolean $continueOddEven optional true
If false, will use a non-static $count variable, so that the odd/even count is reset to zero just for that call.
Returns
Formatted HTML
Link
tableHeaders() public ¶
tableHeaders( array $names , array $trOptions = null , array $thOptions = null )
Returns a row of formatted and named TABLE headers.
Parameters
- array $names
- Array of tablenames.
- array $trOptions optional null
- HTML options for TR elements.
- array $thOptions optional null
- HTML options for TH elements.
Returns
Completed table headers
Link
tag() public ¶
tag( string $name , string $text = null , array $options = array() )
Returns a formatted block tag, i.e DIV, SPAN, P.
Options
escape
Whether or not the contents should be html_entity escaped.
Parameters
- string $name
- Tag name.
- string $text optional null
String content that will appear inside the div element. If null, only a start tag will be printed
- array $options optional array()
- Additional HTML attributes of the DIV tag, see above.
Returns
The formatted tag element
Link
Methods inherited from Helper
__formatAttribute() public ¶
__formatAttribute( string $key , string $value , $escape = true )
Formats an individual attribute, and returns the string value of the composed attribute. Works with minimized attributes that have the same value as their name such as 'disabled' and 'checked'
Parameters
- string $key
- The name of the attribute to create
- string $value
- The value of the attribute to create.
- $escape optional true
Returns
The composed attribute.
__selectedArray() public ¶
__selectedArray( mixed $data , string $key = 'id' )
Transforms a recordset from a hasAndBelongsToMany association to a list of selected options for a multiple select element
Parameters
- mixed $data
- string $key optional 'id'
Returns
_initInputField() public ¶
_initInputField( string $field , array $options = array() )
Sets the defaults for an input tag. Will set the name, value, and id attributes for an array of html attributes. Will also add a 'form-error' class if the field contains validation errors.
Parameters
- string $field
- The field name to initialize.
- array $options optional array()
- Array of options to use while initializing an input field.
Returns
Array options for the form input.
_name() public ¶
_name( mixed $options = array() , string $field = null , string $key = 'name' )
Gets the input field name for the current tag. Creates input name attributes using CakePHP's data[Model][field] formatting.
Parameters
- mixed $options optional array()
If an array, should be an array of attributes that $key needs to be added to. If a string or null, will be used as the View entity.
- string $field optional null
- string $key optional 'name'
- The name of the attribute to be set, defaults to 'name'
Returns
If an array was given for $options, an array with $key set will be returned. If a string was supplied a string will be returned.
_parseAttributes() public ¶
_parseAttributes( array $options , array $exclude = null , string $insertBefore = ' ' , string $insertAfter = null )
Returns a space-delimited string with items of the $options array. If a key of $options array happens to be one of:
- 'compact'
- 'checked'
- 'declare'
- 'readonly'
- 'disabled'
- 'selected'
- 'defer'
- 'ismap'
- 'nohref'
- 'noshade'
- 'nowrap'
- 'multiple'
- 'noresize'
And its value is one of:
- '1' (string)
- 1 (integer)
- true (boolean)
- 'true' (string)
Then the value will be reset to be identical with key's name. If the value is not one of these 3, the parameter is not output.
'escape' is a special option in that it controls the conversion of attributes to their html-entity encoded equivalents. Set to false to disable html-encoding.
If value for any option key is set to null
or false
, that option will be excluded from output.
Parameters
- array $options
- Array of options.
- array $exclude optional null
- Array of options to be excluded, the options here will not be part of the return.
- string $insertBefore optional ' '
- String to be inserted before options.
- string $insertAfter optional null
- String to be inserted after options.
Returns
Composed attributes.
addClass() public ¶
addClass( array $options = array() , string $class = null , string $key = 'class' )
Adds the given class to the element options
Parameters
- array $options optional array()
- Array options/attributes to add a class to
- string $class optional null
- The classname being added.
- string $key optional 'class'
- the key to use for class.
Returns
Array of options with $key set.
afterLayout() public ¶
afterLayout( )
After layout callback. afterLayout is called after the layout has rendered.
Overridden in subclasses.
afterRender() public ¶
afterRender( )
After render callback. afterRender is called after the view file is rendered but before the layout has been rendered.
Overridden in subclasses.
assetTimestamp() public ¶
assetTimestamp( string $path )
Adds a timestamp to a file based resource based on the value of Asset.timestamp
in
Configure. If Asset.timestamp is true and debug > 0, or Asset.timestamp == 'force'
a timestamp will be added.
Parameters
- string $path
- The file path to timestamp, the path must be inside WWW_ROOT
Returns
Path with a timestamp added, or not.
beforeLayout() public ¶
beforeLayout( )
Before layout callback. beforeLayout is called before the layout is rendered.
Overridden in subclasses.
beforeRender() public ¶
beforeRender( )
Before render callback. beforeRender is called before the view file is rendered.
Overridden in subclasses.
clean() public ¶
clean( mixed $output )
Used to remove harmful tags from content. Removes a number of well known XSS attacks from content. However, is not guaranteed to remove all possiblities. Escaping content is the best way to prevent all possible attacks.
Parameters
- mixed $output
- Either an array of strings to clean or a single string to clean.
Returns
content for output
domId() public ¶
domId( mixed $options = null , string $id = 'id' )
Generates a DOM ID for the selected element, if one is not set. Uses the current View::entity() settings to generate a CamelCased id attribute.
Parameters
- mixed $options optional null
Either an array of html attributes to add $id into, or a string with a view entity path to get a domId for.
- string $id optional 'id'
- The name of the 'id' attribute.
Returns
If $options was an array, an array will be returned with $id set. If a string was supplied, a string will be returned.
field() public ¶
field( )
Gets the currently-used model field of the rendering context.
Returns
loadConfig() public ¶
loadConfig( $name = 'tags' )
Parses tag templates into $this->tags.
Parameters
- $name optional 'tags'
- name inside app/config to load.
Returns
merged tags from config/$name.php
modelID() public ¶
modelID( )
Gets the ID of the currently-used model of the rendering context.
Returns
output() public deprecated ¶
output( string $str )
Returns a string generated by a helper method
This method can be overridden in subclasses to do generalized output post-processing
Deprecated
Parameters
- string $str
- String to be output.
Returns
setEntity() public ¶
setEntity( mixed $entity , boolean $setScope = false )
Sets this helper's model and field properties to the dot-separated value-pair in $entity.
Parameters
- mixed $entity
- A field name, like "ModelName.fieldName" or "ModelName.ID.fieldName"
- boolean $setScope optional false
- Sets the view scope to the model specified in $tagValue
tagIsInvalid() public ¶
tagIsInvalid( string $model = null , string $field = null , integer $modelID = null )
Returns null if given FORM field has no errors. Otherwise it returns the constant set in the array Model->validationErrors.
Parameters
- string $model optional null
- Model name as a string
- string $field optional null
- Fieldname as a string
- integer $modelID optional null
- Unique index identifying this record within the form
Returns
Null if no errors, string with error otherwhise.
url() public ¶
url( mixed $url = null , boolean $full = false )
Finds URL for specified action.
Returns a URL pointing at the provided parameters.
Parameters
- mixed $url optional null
Either a relative string url like
/products/view/23
or an array of url parameters. Using an array for urls will allow you to leverage the reverse routing features of CakePHP.- boolean $full optional false
- If true, the full base URL will be prepended to the result
Returns
Full translated URL with base path.
Link
value() public ¶
value( mixed $options = array() , string $field = null , string $key = 'value' )
Gets the data for the current tag
Parameters
- mixed $options optional array()
If an array, should be an array of attributes that $key needs to be added to. If a string or null, will be used as the View entity.
- string $field optional null
- string $key optional 'value'
- The name of the attribute to be set, defaults to 'value'
Returns
If an array was given for $options, an array with $key set will be returned. If a string was supplied a string will be returned.
Methods inherited from Overloadable
Methods inherited from Object
Object() public ¶
Object( )
A hack to support __construct() on PHP 4 Hint: descendant classes have no PHP4 class_name() constructors, so this constructor gets called first and calls the top-layer __construct() which (if present) should call parent::__construct()
Returns
__openPersistent() public ¶
__openPersistent( string $name , string $type = null )
Open the persistent class file for reading Used by Object::_persist()
Parameters
- string $name
- Name of persisted class
- string $type optional null
- Type of persistance (e.g: registry)
_persist() public ¶
_persist( string $name , string $return , $object , $type = null )
Checks for a persistent class file, if found file is opened and true returned If file is not found a file is created and false returned If used in other locations of the model you should choose a unique name for the persistent file There are many uses for this method, see manual for examples
Parameters
- string $name
- name of the class to persist
- string $return
- $object the object to persist
- $object
- $type optional null
Returns
Success
_savePersistent() public ¶
_savePersistent( string $name , object $object )
You should choose a unique name for the persistent file
There are many uses for this method, see manual for examples
Parameters
- string $name
- name used for object to cache
- object $object
- the object to persist
Returns
true on save, throws error if file can not be created
_set() public ¶
_set( array $properties = array() )
Allows setting of multiple properties of the object in a single line of code. Will only set properties that are part of a class declaration.
Parameters
- array $properties optional array()
- An associative array containing properties and corresponding values.
_stop() public ¶
_stop( $status = 0 )
Stop execution of the current script. Wraps exit() making testing easier.
Parameters
- $status optional 0
- http://php.net/exit for values
cakeError() public ¶
cakeError( string $method , array $messages = array() )
Used to report user friendly errors. If there is a file app/error.php or app/app_error.php this file will be loaded error.php is the AppError class it should extend ErrorHandler class.
Parameters
- string $method
- Method to be called in the error class (AppError or ErrorHandler classes)
- array $messages optional array()
- Message that is to be displayed by the error class
Returns
message
dispatchMethod() public ¶
dispatchMethod( string $method , array $params = array() )
Calls a method on this object with the given parameters. Provides an OO wrapper
for call_user_func_array
Parameters
- string $method
- Name of the method to call
- array $params optional array()
- Parameter list to use when calling $method
Returns
Returns the result of the method call
log() public ¶
log( string $msg , integer $type = LOG_ERROR )
Convience method to write a message to CakeLog. See CakeLog::write() for more information on writing to logs.
Parameters
- string $msg
- Log message
- integer $type optional LOG_ERROR
- Error type constant. Defined in app/config/core.php.
Returns
Success of log write
requestAction() public ¶
requestAction( mixed $url , array $extra = array() )
Calls a controller's method from any location. Can be used to connect controllers together or tie plugins into a main application. requestAction can be used to return rendered views or fetch the return value from controller actions.
Parameters
- mixed $url
- String or array-based url.
- array $extra optional array()
- if array includes the key "return" it sets the AutoRender to true.
Returns
Boolean true or false on success/failure, or contents of rendered action if 'return' is set in $extra.
toString() public ¶
toString( )
Object-to-string conversion. Each class can override this method as necessary.
Returns
The name of this class
Properties detail
$__docTypes ¶
Document type definitions
array( 'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">', 'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">', 'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">', 'xhtml-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">', 'xhtml-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">', 'xhtml-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">', 'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">' )
$_scriptBlockOptions ¶
Options for the currently opened script block buffer if any.
array()
$tags ¶
html tags used by this helper.
array( 'meta' => '<meta%s/>', 'metalink' => '<link href="%s"%s/>', 'link' => '<a href="%s"%s>%s</a>', 'mailto' => '<a href="mailto:%s" %s>%s</a>', 'form' => '<form %s>', 'formend' => '</form>', 'input' => '<input name="%s" %s/>', 'textarea' => '<textarea name="%s" %s>%s</textarea>', 'hidden' => '<input type="hidden" name="%s" %s/>', 'checkbox' => '<input type="checkbox" name="%s" %s/>', 'checkboxmultiple' => '<input type="checkbox" name="%s[]"%s />', 'radio' => '<input type="radio" name="%s" id="%s" %s />%s', 'selectstart' => '<select name="%s"%s>', 'selectmultiplestart' => '<select name="%s[]"%s>', 'selectempty' => '<option value=""%s> </option>', 'selectoption' => '<option value="%s"%s>%s</option>', 'selectend' => '</select>', 'optiongroup' => '<optgroup label="%s"%s>', 'optiongroupend' => '</optgroup>', 'checkboxmultiplestart' => '', 'checkboxmultipleend' => '', 'password' => '<input type="password" name="%s" %s/>', 'file' => '<input type="file" name="%s" %s/>', 'file_no_model' => '<input type="file" name="%s" %s/>', 'submit' => '<input %s/>', 'submitimage' => '<input type="image" src="%s" %s/>', 'button' => '<button type="%s"%s>%s</button>', 'image' => '<img src="%s" %s/>', 'tableheader' => '<th%s>%s</th>', 'tableheaderrow' => '<tr%s>%s</tr>', 'tablecell' => '<td%s>%s</td>', 'tablerow' => '<tr%s>%s</tr>', 'block' => '<div%s>%s</div>', 'blockstart' => '<div%s>', 'blockend' => '</div>', 'tag' => '<%s%s>%s</%s>', 'tagstart' => '<%s%s>', 'tagend' => '</%s>', 'para' => '<p%s>%s</p>', 'parastart' => '<p%s>', 'label' => '<label for="%s"%s>%s</label>', 'fieldset' => '<fieldset%s>%s</fieldset>', 'fieldsetstart' => '<fieldset><legend>%s</legend>', 'fieldsetend' => '</fieldset>', 'legend' => '<legend>%s</legend>', 'css' => '<link rel="%s" type="text/css" href="%s" %s/>', 'style' => '<style type="text/css"%s>%s</style>', 'charset' => '<meta http-equiv="Content-Type" content="text/html; charset=%s" />', 'ul' => '<ul%s>%s</ul>', 'ol' => '<ol%s>%s</ol>', 'li' => '<li%s>%s</li>', 'error' => '<div%s>%s</div>', 'javascriptblock' => '<script type="text/javascript"%s>%s</script>', 'javascriptstart' => '<script type="text/javascript">', 'javascriptlink' => '<script type="text/javascript" src="%s"%s></script>', 'javascriptend' => '</script>' )