2004.04.29


com.jdc.gui.html.tag
Class Body

java.lang.Object
  |
  +--com.jdc.xml.ComplexTag
        |
        +--com.jdc.gui.html.ComplexTag
              |
              +--com.jdc.gui.html.tag.Body
All Implemented Interfaces:
MarkupLanguage, Serializable

public class Body
extends ComplexTag

Body contains the document body. BODY is required in non-frames documents, but its start and end tags are always optional. In frames documents, BODY must be contained within the NOFRAMES element, if NOFRAMES is used.

The BODY element contains the document's content. The content should be contained within block-level elements or SCRIPT elements, though HTML 4.0 Transitional also allows inline elements directly within BODY.

BODY takes a number of attributes for specifying the background and colors of the document on visual browsers. These attributes are deprecated in HTML 4.0 in favor of style sheets, which provide greater flexibility in suggesting the presentation of a document. BGCOLOR suggests a background color, TEXT suggests a text color, LINK suggests a link color, VLINK suggests a visited link color, and ALINK suggests an active link color (when the link is selected). If one of these attributes is given, then all of them should be included to ensure that the user's chosen colors do not interfere with those suggested in the BODY tag. Authors should not rely on the specified colors being used since browsers allow these colors to be overridden by the user.

The BACKGROUND attribute suggests a background image for tiling on the document canvas. To help ensure a readable document, the BGCOLOR, TEXT, LINK, VLINK, and ALINK attributes should always be included when BACKGROUND is given. The BGCOLOR will be used for those not loading images.

Style sheets allow more flexibility in suggesting a background image, including the ability to specify the position of the image, how the image is tiled, and whether the image should scroll with the document.

In addition to the core events common to most elements, BODY accepts the following event attributes for client-side scripting:

Reference: The BODY element

Version:
1.0
Author:
Jay Damon
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.jdc.gui.html.MarkupLanguage
XHTML
 
Constructor Summary
Body()
          Constructs a new Body object.
 
Method Summary
static void main(String[] args)
          Executes unit tests for the Body class.
 Body setOnLoad(String function)
          Sets the base language of the text content and attribute values.
 Body setOnUnload(String function)
          Sets the base language of the text content and attribute values.
 
Methods inherited from class com.jdc.gui.html.ComplexTag
addAttribute, create, create, endTag, setFormat, setIdentifier, startTag
 
Methods inherited from class com.jdc.xml.ComplexTag
addAttribute, create, create, endTag, getAttributes, getBody, getIdentifier, setBody, startTag, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Body

public Body()
Constructs a new Body object.

Method Detail

setOnLoad

public Body setOnLoad(String function)
Sets the base language of the text content and attribute values. [RFC1766] defines and explains the language codes that may be used in HTML documents.

Returns:
This Body tag.

setOnUnload

public Body setOnUnload(String function)
Sets the base language of the text content and attribute values. [RFC1766] defines and explains the language codes that may be used in HTML documents.

Returns:
This Body tag.

main

public static void main(String[] args)
Executes unit tests for the Body class.


2004.04.29



Copyright © 2004 J. Damon & Co.; All Rights Reserved WorldWide.