.NET Framework Class Library
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)
Syntax
Public Enumeration HtmlTextWriterTag
public enum HtmlTextWriterTag
public enum class HtmlTextWriterTag
type HtmlTextWriterTag
Members
Member nameDescription
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.
UnknownThe string passed as an HTML tag is not recognized.
VarThe HTML var element.
WbrThe HTML wbr element.
XmlThe HTML xml element.
Remarks

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

Examples

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)
writer.RenderBeginTag(HtmlTextWriterTag.Img)
writer.RenderEndTag()
writer.WriteLine()
// 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);
writer.RenderBeginTag(HtmlTextWriterTag.Img);
writer.RenderEndTag();
writer.WriteLine();
// 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 );
writer->RenderBeginTag( HtmlTextWriterTag::Img );
writer->RenderEndTag();
writer->WriteLine();
Version Information

.NET Framework

Supported in: 4.5.2, 4.5.1, 4.5, 4, 3.5, 3.0, 2.0, 1.1, 1.0
Platforms

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

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