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.

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

public enum HtmlTextWriterTag

Member nameDescription
UnknownThe string passed as an HTML tag is not recognized.
AThe HTML a element.
AcronymThe HTML acronym element.
AddressThe HTML address element.
AreaThe HTML area element.
BThe HTML b element.
BaseThe HTML base element.
BasefontThe HTML basefont element.
BdoThe HTML bdo element.
BgsoundThe HTML bgsound element.
BigThe HTML big element.
BlockquoteThe HTML blockquote element.
BodyThe HTML body element.
BrThe HTML br element.
ButtonThe HTML button element.
CaptionThe HTML caption element.
CenterThe HTML center element.
CiteThe HTML cite element.
CodeThe HTML code element.
ColThe HTML col element.
ColgroupThe HTML colgroup element.
DdThe HTML dd element.
DelThe HTML del element.
DfnThe HTML dfn element.
DirThe HTML dir element.
DivThe HTML div element.
DlThe HTML dl element.
DtThe HTML dt element.
EmThe HTML em element.
EmbedThe HTML embed element.
FieldsetThe HTML fieldset element.
FontThe HTML font element.
FormThe HTML form element.
FrameThe HTML frame element.
FramesetThe HTML frameset element.
H1The HTML H1 element.
H2The HTML H2 element.
H3The HTML H3 element.
H4The HTML H4 element.
H5The HTML H5 element.
H6The HTML H6 element.
HeadThe HTML head element.
HrThe HTML hr element.
HtmlThe HTML html element.
IThe HTML i element.
IframeThe HTML iframe element.
ImgThe HTML img element.
InputThe HTML input element.
InsThe HTML ins element.
IsindexThe HTML isindex element.
KbdThe HTML kbd element.
LabelThe HTML label element.
LegendThe HTML legend element.
LiThe HTML li element.
LinkThe HTML link element.
MapThe HTML map element.
MarqueeThe HTML marquee element.
MenuThe HTML menu element.
MetaThe HTML meta element.
NobrThe HTML nobr element.
NoframesThe HTML noframes element.
NoscriptThe HTML noscript element.
ObjectThe HTML object element.
OlThe HTML ol element.
OptionThe HTML option element.
PThe HTML p element.
ParamThe HTML param element.
PreThe HTML pre element.
QThe HTML q element.
RtThe DHTML rt element, which specifies text for the ruby element.
RubyThe DHTML ruby element.
SThe HTML s element.
SampThe HTML samp element.
ScriptThe HTML script element.
SelectThe HTML select element.
SmallThe HTML small element.
SpanThe HTML span element.
StrikeThe HTML strike element.
StrongThe HTML strong element.
StyleThe HTML style element.
SubThe HTML sub element.
SupThe HTML sup element.
TableThe HTML table element.
TbodyThe HTML tbody element.
TdThe HTML td element.
TextareaThe HTML textarea element.
TfootThe HTML tfoot element.
ThThe HTML th element.
TheadThe HTML thead element.
TitleThe HTML title element.
TrThe HTML tr element.
TtThe HTML tt element.
UThe HTML u element.
UlThe HTML ul element.
VarThe HTML var element.
WbrThe HTML wbr element.
XmlThe HTML xml element.

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

The following example demonstrates the use of the HtmlTextWriterTag enumeration. The Img field is used during rendering of an HtmlTextWriter named writer.

// Control the encoding of attributes. 
// Simple known values do not need encoding.
writer.AddAttribute(HtmlTextWriterAttribute.Alt, "Encoding, \"Required\"", true);
writer.AddAttribute("myattribute", "No "encoding " required", false);

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.