<ao:html>

  1. Clears the current output buffer (leaving status code and headers)
  2. Sets the response contentType between html / xhtml based on serialization attribute and request headers
  3. Writes the <!DOCTYPE> unless set to "none"
  4. Writes the <html> tag, including the xmlns, lang, and xml:lang attributes based on the locale of the current response.
  5. Establishes a page context for AO Web Resources, if one is not already present on the current request. This is useful for using the AO Web Resources Taglib within the simplified scope of a standalone JSP page. Any page context established by this tag is cleaned-up before the tag exits - the scope is limited to nested tags.

Tag Information

Tag Class: com.aoindustries.taglib.HtmlTag
TagExtraInfo Class: com.aoindustries.taglib.HtmlTagTEI
Body Content: JSP
Display Name: None
Dynamic Attributes: true

Attributes

Name Required Evaluation Type Description
id No Runtime String

The id of the element.

class No Runtime String

The CSS class for the element.

dir No Runtime String

The dir of the element.

style No Runtime Object

The CSS style for the element.

serialization No Runtime String

When SGML, forces the content-type to be text/html. When XML, forces the content-type to be application/xhtml+xml. When auto (the default), the following steps are performed to resolve the serialization:

  1. Use the serialization active on the current request.
  2. Use the application context-param com.aoindustries.encoding.Serialization.default that allows an application to control the selection of HTML versus XHTML.
  3. When this context-param is unspecified or auto, determine the serialization based on the client's Accept header.

This should normally be left with the default value of auto. This is used when the content is known to contain invalid markup that can not be parsed as XML.

doctype No Runtime String

The <!DOCTYPE> to use, must be one of default, HTML5, STRICT, TRANSITIONAL, FRAMESET, or NONE. Defaults to default. NONE will suppress the output of a doctype.

When default (the default), the following steps are performed to resolve the doctype:

  1. Use the doctype active on the current request.
  2. Use the application context-param com.aoindustries.encoding.Doctype.default that allows an application to control the default doctype.
  3. When this context-param is unspecified or default, defaults to HTML5, which results in a breaking change (this tag used to default to STRICT).

Variables

No Variables Defined.