System.Web 2.0.0.0 System.Web.UI.HtmlTextWriter XHTML is an XML-compliant markup language, based on HTML 4.1, which allows you to create Web sites that are suitable for multiple device types. It merges the ease of use provided by HTML with the strict element guidelines provided by XML to produce a markup language with a wide range of format and style options, and with reduced markup tag ambiguity. The class provides formatting capabilities that ASP.NET server controls use when rendering XHTML content to clients. You can use the method to specify which type of XHTML the text writer renders. Supported document types are defined in the enumeration. The class renders two sets of attributes for elements. One set is a collection of common attributes, as referenced in the property. The second set is a collection of element-specific attributes, as referenced in the property. 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. You can use the members of the class and any derived classes to create custom text writers to use in custom XHTML page adapters or class adapters. You can also create derived classes that override the standard behavior of the class. By default, when you are working with browsers that support HTML 4.0, ASP.NET pages and controls render markup that is compatible with the XHTML 1.1 standard. For more information, see ASP.NET and XHTML Compliance. The outputs XHTML unless you configure ASP.NET specifically to not render XHTML markup. For more information, see How to: Configure ASP.NET Web Sites for Non-XHTML Rendering. Writes Extensible Hypertext Markup Language (XHTML)-specific characters, including all variations of XHTML modules that derive from XTHML, to the output stream for an ASP.NET server control for mobile devices. Override the class to provide custom XHTML rendering for ASP.NET pages and server controls. Constructor The constructor that takes a object as a parameter calls the second constructor, passing two parameter values: The instance. The string value that is specified in the field, which defines the tab spacing that is used by the XHTML text writer. Initializes a new instance of the class that uses the line indentation that is specified in the field. Use the constructor if you do not want to change the default line indentation. A instance that renders the XHTML content. 2.0.0.0 Constructor To be added. Initializes a new instance of the class with the specified line indentation. A instance that renders the XHTML content. The string used to render a line indentation. 2.0.0.0 Method System.Void Use the method to add an attribute to an XHTML element. The added attribute can then be recognized and rendered by the object. To prevent the writer from rendering a common attribute of an XHTML element, use the method. Adds an attribute to an XHTML element. The collection of element-specific attributes for the object is referenced by the property. The XHTML element to add the attribute to. The attribute to add. 2.0.0.0 Property System.Collections.Hashtable To be added. The collection contains attributes that are allowed in XHTML elements and that are not suppressed in the property. For more information on common attributes, see the World Wide Web Consortium (W3C) Web site. When a new instance of the class is created, the common attributes that are initialized are: class id title xml:lang Gets a object containing common attributes of the markup tags for the object. 2.0.0.0 Property System.Collections.Hashtable To be added. Use the method to add recognized attributes to an XHTML element. To remove common attributes on an XHTML element, use the method. When a new instance of the class is created, the object of element-specific attributes is populated with the attributes shown in the following table. Element Attributes <a> accesskey, href, charset, hreflang, rel, type, rev, title, tabindex <base> href <blockquote> cite <br> id, class, title <form> action, method, enctype <head> xml:lang <html> version, xml:lang, xmlns <img> src, alt, width, longdesc, height <input> size, accesskey, title, name, type, disabled, value, src, checked, maxlength, tabindex <label> accesskey, for <li> value <link> hreflang, rev, type, charset, rel, href, media <meta> content, name, xml:lang, http-equiv, scheme <object> codebase, classid, data, standby, name, type, height, archive, declare, width, tabindex, codetype <ol> start <optgroup> label, disabled <option> selected, value <param> id, name, valuetype, value, type <pre> xml:space <q> cite <select> name, tabindex, disabled, multiple, size <style> xml:lang, xml:space, type, title, media <table> width, summary <textarea> name, cols, accesskey, tabindex, rows <td> headers, align, rowspan, colspan, axis, scope, abbr, valign <th> headers, align, rowspan, colspan, axis, scope, abbr, valign <title> xml:lang <tr> 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. Gets a object containing element-specific attributes. 2.0.0.0 Method System.Boolean This method is useful to conditionally render an attribute depending on whether it is supported by the XHTML document type of the requesting device. Checks an XHTML attribute to ensure that it can be rendered in the opening tag of a <form> element. true if the attribute can be applied to a <form> element; otherwise, false. The attribute name to check. 2.0.0.0 Method System.Boolean To be added. Determines whether the specified XHTML attribute and its value can be rendered to the current markup element. true if the attribute is rendered to the page; otherwise, false. The XHTML attribute to render. The value assigned to the XHTML attribute. The enumeration value associated with the XHTML attribute. 2.0.0.0 Method System.Boolean To be added. Determines whether the specified XHTML style attribute and its value can be rendered to the current markup element. true if the style attribute is rendered; otherwise, false. The XHTML style attribute to render. The value assigned to the XHTML style attribute. The enumeration value associated with the XHTML style attribute. 2.0.0.0 Method System.Void To be added. Removes an attribute from the collection of an element. The XHTML element to remove an attribute from. The attribute to remove from the specified XHTML element. 2.0.0.0 Method System.Void Use the method in a custom page adapter to define the type of XHTML that you want to render to the requesting device. Supported document types are defined in the enumeration. Specifies the XHTML document type for the text writer to render to the page or control. One of the enumeration values. 2.0.0.0 Property System.Collections.Hashtable To be added. The suppressed attribute collection includes a list of XHTML elements for which attributes are not rendered. When a new instance of the class is created, the object of elements for which attributes are suppressed includes: base meta br head title html style Gets a object of elements for which attributes are suppressed. 2.0.0.0 Method System.Void To be added. Writes a <br/> element to the XHTML output stream. 2.0.0.0