Provides methods to generate HTML tags programmatically when you
can’t use a Builder. By default, they output XHTML compliant tags.
| Public Methods |
| cdata_section |
Returns a CDATA section with the given content. CDATA sections are
used to escape blocks of text containing characters which would otherwise
be recognized as markup. CDATA sections begin with the string
<![CDATA[ and end with (and may not contain) the string
]]>.
|
| content_tag |
Returns an HTML block tag of type name surrounding the
content. Add HTML attributes by passing an attributes hash to
options. Instead of passing the content as an argument, you can
also use a block in which case, you pass your options as the
second parameter. Set escape to false to disable attribute value escaping.
|
| escape_once |
Returns an escaped version of html without affecting existing
escaped entities.
|
| tag |
Returns an empty HTML tag of type name which by default is XHTML
compliant. Set open to true to create an open tag compatible with
HTML 4.0 and below. Add HTML attributes by passing an attributes hash to
options. Set escape to false to disable attribute value
escaping.
|
<code/>and<pre/>for code samples.