Using the Background Element
This topic describes VML, a feature that is deprecated as of Windows Internet Explorer 9. Webpages and applications that rely on VML should be migrated to SVG or other widely supported standards.
Note As of December 2011, this topic has been archived. As a result, it is no longer actively maintained. For more information, see Archived Content. For information, recommendations, and guidance regarding the current version of Windows Internet Explorer, see Internet Explorer Developer Center.
In this topic, we will illustrate how you can customize the background of a Web page by using the <background> element provided in VML.
As you've learned from the Use <fill> topic, you can place the <fill> sub-element inside the <shape>, <shapetype>, or any predefined shape element to describe how to fill the shape.
Similarly, you can place the <fill> sub-element inside the <background> element to describe how to fill the background of a Web page. You can then use the property attributes of the <fill> sub-element to customize the fill effect, such as gradient fill, pattern fill, or picture fill.
For example, to draw a gradient-filled background, you can type the following lines in the <BODY> region of your Web page:
<v:background fillcolor="red">
<v:fill type="gradient"/>
</v:background>
For more information about this element, see the VML specification .
Send comments about this topic to Microsoft
Build date: 2/7/2012