VML Class Attribute

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.

Refers to a definition of a CSS style. Read/write. String.

Applies To


Tag Syntax

<v: element class=" expression ">

Script Syntax

element .classname="expression"



The class attribute is similar to the standard HTML class attribute used with CSS style sheets.

Note that classname is used instead of class for scripting. Also note that for scripting, the classname can only be read; changing the value of classname will not change the rendering of the shape.

VML Standard Attribute

See Also



A class for width is created with the style

   .narrowstyle {width:50;height:100}

Then the width is referenced by including the style. Note that the width andheight is not defined in the style attribute, but will be defined by the style.

   <v:shape id="rect01" class="narrowstyle"
   fillcolor="red" strokecolor="red"
   coordorigin="0 0" coordsize="200 200"
   path="m 1,1 l 1,200, 200,200, 200,1 x e">

Note that Class only applies to CSS-type attributes.



Send comments about this topic to Microsoft

Build date: 2/7/2012

Community Additions