Type Attribute (Shape)(VML)

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.

Defines a reference to the ID of a ShapeType element. Read/write. String.

Applies To


Tag Syntax

          type=" expression ">

Script Syntax


expression=element .type


If the Type attribute references the ID of a ShapeType element, the fills, paths, and strokes of the ShapeType are used as templates to create the shape. Values derived from ShapeType can be overridden by individual shape values.

If used in tags, the string value must begin with a number sign (#) symbol.

VML Standard Attribute


A ShapeType shape is created with the "mytype" as an ID.

   <v:shapetype id="mytype"
   fillcolor="red" strokecolor="blue"
   coordorigin="0 0" coordsize="200 200">
   <v:path v="m 0,0 l 0,200, 200,200, 200,0 x e"/>

Then if you create a shape using the ShapeType values, the shape will have the attributes of the "mytype" ShapeType; that is, "shape01" will have a red fill with a blue stroke.

   <v:shape id="shape01" type="#mytype"

You can override the inherited values, for example, by changing the color to green.

   <v:shape id="shape02" type="#mytype"

Type Attribute Example. (Requires Microsoft Internet Explorer 5 or greater.)



Send comments about this topic to Microsoft

Build date: 2/7/2012

Community Additions