the first code snippet below uses the attributes collection of the <body> tag (implemented as an htmlcontrol object) to reference its standard html attributes. this method gives you programmatic access to any of the html attributes that you normally hard-code into your <body> tag.
the second method uses the style object property of the htmlcontrol object. by making calls to the style object property's add method, you can add custom styles to your <body> tag. these are implemented as an inline style tag when it is rendered to the browser. because of this, you may want to research whether the style you are going to implement is compatible with the browser you are targeting.
the techniques used here can be used to set the properties of any html control that does not have a server control equivalent. an example would be the <p> tag.
sample code 1: use the "attributes" collection of the body tag