Document Backgrounds

As well as containing a< body, a document> element can also contain the definition of the document's background via the <background> element and its contents. This background applies to all printed pages within this document. A document background in WordprocessingML can have a single color, as well as the application of various drawing effects such as color gradient or pattern, and a tiled or stretched image. All background information in a WordprocessingML document is stored using the Vector Markup Language (VML) syntax. The single exception to this is the background color, which is stored natively in WordprocessingML using the @bgColor attribute.

Consider a simple background in WordprocessingML, which consists of a single color with a gradient fill applied:

<w:background w:bgColor="5C83B4">
  <v:background id="_x0000_s1025" o:bwmode="white" fillcolor="#5c83b4
    [3204] o:targetscreensize="800,600">
    <v:fill color2="fill darken(118) method="linear sigma" focus="100%"
      type="gradient"/>
  </v:background>
</w:bgPict>

The background consists of two components: a background fill color of RGB value 5C83B4, and the background gradient stored as a VML transformation.