XhtmlTextWriter.ElementSpecificAttributes Property

Gets a Hashtable object containing element-specific attributes.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

protected Hashtable ElementSpecificAttributes { get; }
/** @property */
protected Hashtable get_ElementSpecificAttributes ()

protected function get ElementSpecificAttributes () : Hashtable

Not applicable.

Property Value

A Hashtable object containing element-specific attributes.

Use the AddRecognizedAttribute method to add recognized attributes to an XHTML element. To remove common attributes on an XHTML element, use the RemoveRecognizedAttribute method.

When a new instance of the XhtmlTextWriter class is created, the Hashtable object of element-specific attributes is populated with the attributes shown in the following table.




accesskey, href, charset, hreflang, rel, type, rev, title, tabindex






id, class, title


action, method, enctype




version, xml:lang, xmlns


src, alt, width, longdesc, height


size, accesskey, title, name, type, disabled, value, src, checked, maxlength, tabindex


accesskey, for




hreflang, rev, type, charset, rel, href, media


content, name, xml:lang, http-equiv, scheme


codebase, classid, data, standby, name, type, height, archive, declare, width, tabindex, codetype




label, disabled


selected, value


id, name, valuetype, value, type






name, tabindex, disabled, multiple, size


xml:lang, xml:space, type, title, media


width, summary


name, cols, accesskey, tabindex, rows


headers, align, rowspan, colspan, axis, scope, abbr, valign


headers, align, rowspan, colspan, axis, scope, abbr, valign




align, valign

For more information on the elements and styles that are rendered, see the XHTML modularization specification at the World Wide Web Consortium (W3C) Web site.

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions