Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
Previous Versions
.NET Framework 2.0
System.Web.UI
 HtmlTextWriterTag Enumeration

  Switch on low bandwidth view
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
.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)

Visual Basic (Declaration)
Public Enumeration HtmlTextWriterTag
Visual Basic (Usage)
Dim instance As HtmlTextWriterTag
C#
public enum HtmlTextWriterTag
C++
public enum class HtmlTextWriterTag
J#
public enum HtmlTextWriterTag
JScript
public enum HtmlTextWriterTag
 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.  

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.

Visual Basic
' 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()
C#
// 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();
C++
// 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();
J#
// 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();

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

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

.NET Framework

Supported in: 2.0, 1.1, 1.0
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker