This documentation is archived and is not being maintained.

HtmlTextWriterTag Enumeration

Specifies the HTML tags that can be passed to an HtmlTextWriter or Html32TextWriter object output stream.

[Visual Basic]
<Serializable>
Public Enum HtmlTextWriterTag
[C#]
[Serializable]
public enum HtmlTextWriterTag
[C++]
[Serializable]
__value public enum HtmlTextWriterTag
[JScript]
public
   Serializable
enum HtmlTextWriterTag

Remarks

This enumeration allows the output stream to write HTML mark up, along with HTML server controls, in response to a Web request.

Members

Member name Description
A Specifies the HTML a element.
Acronym Specifies the HTML acronym element.
Address Specifies the HTML address element.
Area Specifies the HTML area element.
B Specifies the HTML b element.
Base Specifies the HTML base element.
Basefont Specifies the HTML basefont element.
Bdo Specifies the HTML bdo element.
Bgsound Specifies the HTML bgsound element.
Big Specifies the HTML big element.
Blockquote Specifies the HTML blockquote element.
Body Specifies the HTML body element.
Br Specifies the HTML br element.
Button Specifies the HTML button element.
Caption Specifies the HTML caption element.
Center Specifies the HTML center element.
Cite Specifies the HTML cite element.
Code Specifies the HTML code element.
Col Specifies the HTML col element.
Colgroup Specifies the HTML colgroup element.
Dd Specifies the HTML dd element.
Del Specifies the HTML cel element.
Dfn Specifies the HTML dfn element.
Dir Specifies the HTML dir element.
Div Specifies the HTML div element.
Dl Specifies the HTML dl element.
Dt Specifies the HTML dt element.
Em Specifies the HTML em element.
Embed Specifies the HTML embed element.
Fieldset Specifies the HTML fieldset element.
Font Specifies the HTML font element.
Form Specifies the HTML form element.
Frame Specifies the HTML frame element.
Frameset Specifies the HTML frameset element.
H1 Specifies the HTML H1 element.
H2 Specifies the HTML H2 element.
H3 Specifies the HTML H3 element.
H4 Specifies the HTML H4 element.
H5 Specifies the HTML H5 element.
H6 Specifies the HTML H6 element.
Head Specifies the HTML head element.
Hr Specifies the HTML hr element.
Html Specifies the HTML html element.
I Specifies the HTML i element.
Iframe Specifies the HTML iframe element.
Img Specifies the HTML img element.
Input Specifies the HTML input element.
Ins Specifies the HTML ins element.
Isindex Specifies the HTML isindex element.
Kbd Specifies the HTML kbd element.
Label Specifies the HTML label element.
Legend Specifies the HTML legend element.
Li Specifies the HTML li element.
Link Specifies the HTML link element.
Map Specifies the HTML map element.
Marquee Specifies the HTML marquee element.
Menu Specifies the HTML menu element.
Meta Specifies the HTML meta element.
Nobr Specifies the HTML nobr element.
Noframes Specifies the HTML noframes element.
Noscript Specifies the HTML noscript element.
Object Specifies the HTML object element.
Ol Specifies the HTML ol element.
Option Specifies the HTML option element.
P Specifies the HTML p element.
Param Specifies the HTML param element.
Pre Specifies the HTML pre element.
Q Specifies the HTML q element.
Rt Specifies the DHTML rt element, which specifies text for the ruby element.
Ruby Specifies the DHTML ruby element.
S Specifies the HTML s element.
Samp Specifies the HTML samp element.
Script Specifies the HTML script element.
Select Specifies the HTML select element.
Small Specifies the HTML small element.
Span Specifies the HTML span element.
Strike Specifies the HTML strike element.
Strong Specifies the HTML strong element.
Style Specifies the HTML style element.
Sub Specifies the HTML sub element.
Sup Specifies the HTML sup element.
Table Specifies the HTML table element.
Tbody Specifies the HTML tbody element.
Td Specifies the HTML td element.
Textarea Specifies the HTML textarea element.
Tfoot Specifies the HTML tfoot element.
Th Specifies the HTML th element.
Thead Specifies the HTML thead element.
Title Specifies the HTML title element.
Tr Specifies the HTML tr element.
Tt Specifies the HTML tt element.
U Specifies the HTML u element.
Ul Specifies the HTML ul element.
Unknown The String passed as an HTML tag is not recognized.
Var Specifies the HTML var element.
Wbr Specifies the HTML wbr element.
Xml Specifies the HTML xml element.

Example

[Visual Basic] 
' Control HTML encoding of attributes.
     ' Simple known values do not need encoding.
writer.AddAttribute(HtmlTextWriterAttribute.Alt, "Encoding, ""Required""", True)
writer.AddAttribute("myattribute", "No &quot;encoding &quot; required", False)
writer.RenderBeginTag(HtmlTextWriterTag.Img)
writer.RenderEndTag()
writer.WriteLine()

[C#] 
// Control HTML encoding of attributes. 
        // Simple known values do not need encoding.
writer.AddAttribute(HtmlTextWriterAttribute.Alt, "Encoding, \"Required\"", true);
writer.AddAttribute("myattribute", "No &quot;encoding &quot; required", false);
writer.RenderBeginTag(HtmlTextWriterTag.Img);
writer.RenderEndTag();
writer.WriteLine();

[C++] 
// Control HTML encoding of attributes.
// Simple known values do not need encoding.
writer->AddAttribute(HtmlTextWriterAttribute::Alt, S"Encoding, \"Required\"", true);
writer->AddAttribute(S"myattribute", S"No &quot;encoding &quot; required", false);
writer->RenderBeginTag(HtmlTextWriterTag::Img);
writer->RenderEndTag();
writer->WriteLine();

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Web.UI

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web (in System.Web.dll)

See Also

System.Web.UI Namespace | HtmlTextWriter

Show: