Class Tag
Helper to quickly generate all HTML5 tags with a Tag.Img() or Tag.Table() syntax.
This is the easiest and safest way to use in in Razor templates because you won't have naming issues etc.
The objects are smart - for example this will automatically uri-encode 😎
Tag.Img().Src("ünsafe.jpg")
Important: Tag can easily be confused with the Tags object.
new in 3.0
Inheritance
Namespace: ToSic.Razor.Blade
Assembly: ToSic.Razor.dll
Syntax
public static class Tag
Methods
| Improve this Doc View SourceA(Object[])
Generate a standard HTML5 <a> tag with optional contents
Declaration
public static A A(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
A | A A object with all the attributes available in that tag |
Abbr(Object[])
Generate a standard HTML5 <abbr> tag with optional contents
Declaration
public static Abbr Abbr(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Abbr | A Abbr object with all the attributes available in that tag |
Address(Object[])
Generate a standard HTML5 <address> tag with optional contents
Declaration
public static Address Address(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Address | A Address object with all the attributes available in that tag |
Area(Object[])
Generate a standard HTML5 <area> tag with optional contents
Declaration
public static Area Area(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Area | A Area object with all the attributes available in that tag |
Article(Object[])
Generate a standard HTML5 <article> tag with optional contents
Declaration
public static Article Article(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Article | A Article object with all the attributes available in that tag |
Aside(Object[])
Generate a standard HTML5 <aside> tag with optional contents
Declaration
public static Aside Aside(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Aside | A Aside object with all the attributes available in that tag |
Attr(String, Object, AttributeOptions)
Generate an attribute for use in a tag
Declaration
public static Attribute Attr(string name, object value = null, AttributeOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | attribute name |
System.Object | value | attribute value object - will be serialized to json |
AttributeOptions | options | optional configuration regarding quotes and encoding |
Returns
Type | Description |
---|---|
Attribute | HtmlString so you can use <div @Tag.Attr("myid", 5930)> in your code |
Attr(String, String, AttributeOptions)
Generate an attribute for use in a tag
Declaration
public static Attribute Attr(string name, string value, AttributeOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | attribute name |
System.String | value | attribute value |
AttributeOptions | options | optional configuration regarding quotes and encoding |
Returns
Type | Description |
---|---|
Attribute | HtmlString so you can use <div @Tag.Attr("myid", "5930")> in your code |
Audio(Object[])
Generate a standard HTML5 <audio> tag with optional contents
Declaration
public static Audio Audio(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Audio | A Audio object with all the attributes available in that tag |
B(Object[])
Generate a standard HTML5 <b> tag with optional contents
Declaration
public static B B(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
B | A B object with all the attributes available in that tag |
Base(Object[])
Generate a standard HTML5 <base> tag with optional contents
Declaration
public static Base Base(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Base | A Base object with all the attributes available in that tag |
Bdi(Object[])
Generate a standard HTML5 <bdi> tag with optional contents
Declaration
public static Bdi Bdi(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Bdi | A Bdi object with all the attributes available in that tag |
Bdo(Object[])
Generate a standard HTML5 <bdo> tag with optional contents
Declaration
public static Bdo Bdo(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Bdo | A Bdo object with all the attributes available in that tag |
Blockquote(Object[])
Generate a standard HTML5 <blockquote> tag with optional contents
Declaration
public static Blockquote Blockquote(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Blockquote | A Blockquote object with all the attributes available in that tag |
Br(Object[])
Generate a standard HTML5 <br> tag with optional contents
Declaration
public static Br Br(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Br | A Br object with all the attributes available in that tag |
Button(Object[])
Generate a standard HTML5 <button> tag with optional contents
Declaration
public static Button Button(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Button | A Button object with all the attributes available in that tag |
Canvas(Object[])
Generate a standard HTML5 <canvas> tag with optional contents
Declaration
public static Canvas Canvas(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Canvas | A Canvas object with all the attributes available in that tag |
Caption(Object[])
Generate a standard HTML5 <caption> tag with optional contents
Declaration
public static Caption Caption(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Caption | A Caption object with all the attributes available in that tag |
Cite(Object[])
Generate a standard HTML5 <cite> tag with optional contents
Declaration
public static Cite Cite(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Cite | A Cite object with all the attributes available in that tag |
Code(Object[])
Generate a standard HTML5 <code> tag with optional contents
Declaration
public static Code Code(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Code | A Code object with all the attributes available in that tag |
Col(Object[])
Generate a standard HTML5 <col> tag with optional contents
Declaration
public static Col Col(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Col | A Col object with all the attributes available in that tag |
Colgroup(Object[])
Generate a standard HTML5 <colgroup> tag with optional contents
Declaration
public static Colgroup Colgroup(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Colgroup | A Colgroup object with all the attributes available in that tag |
Comment(String)
Declaration
public static Comment Comment(string content = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | content |
Returns
Type | Description |
---|---|
Comment |
Custom(String, Object[])
Create a generic html tag for a specific name. We recommend to use the normal tag overloads instead. So Tag.Img(...) is better than Tag.Custom("Img") because it's preconfigured to self-close, encode the src etc. RawHtml(Object[])
Declaration
public static TagCustom Custom(string name, params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | tag name |
System.Object[] | content | optional content to place within the tag - can be a string or other tags |
Returns
Type | Description |
---|---|
TagCustom | HtmlString of the tag, so you can use it directly with @TagBase.TagStart(...) in your razor |
Data(Object[])
Generate a standard HTML5 <data> tag with optional contents
Declaration
public static Data Data(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Data | A Data object with all the attributes available in that tag |
Datalist(Object[])
Generate a standard HTML5 <datalist> tag with optional contents
Declaration
public static Datalist Datalist(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Datalist | A Datalist object with all the attributes available in that tag |
Dd(Object[])
Generate a standard HTML5 <dd> tag with optional contents
Declaration
public static Dd Dd(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Dd | A Dd object with all the attributes available in that tag |
Del(Object[])
Generate a standard HTML5 <del> tag with optional contents
Declaration
public static Del Del(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Del | A Del object with all the attributes available in that tag |
Details(Object[])
Generate a standard HTML5 <details> tag with optional contents
Declaration
public static Details Details(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Details | A Details object with all the attributes available in that tag |
Dfn(Object[])
Generate a standard HTML5 <dfn> tag with optional contents
Declaration
public static Dfn Dfn(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Dfn | A Dfn object with all the attributes available in that tag |
Dialog(Object[])
Generate a standard HTML5 <dialog> tag with optional contents
Declaration
public static Dialog Dialog(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Dialog | A Dialog object with all the attributes available in that tag |
Div(Object[])
Generate a standard HTML5 <div> tag with optional contents
Declaration
public static Div Div(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Div | A Div object with all the attributes available in that tag |
Dl(Object[])
Generate a standard HTML5 <dl> tag with optional contents
Declaration
public static Dl Dl(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Dl | A Dl object with all the attributes available in that tag |
Dt(Object[])
Generate a standard HTML5 <dt> tag with optional contents
Declaration
public static Dt Dt(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Dt | A Dt object with all the attributes available in that tag |
Em(Object[])
Generate a standard HTML5 <em> tag with optional contents
Declaration
public static Em Em(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Em | A Em object with all the attributes available in that tag |
Embed(Object[])
Generate a standard HTML5 <embed> tag with optional contents
Declaration
public static Embed Embed(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Embed | A Embed object with all the attributes available in that tag |
Fieldset(Object[])
Generate a standard HTML5 <fieldset> tag with optional contents
Declaration
public static Fieldset Fieldset(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Fieldset | A Fieldset object with all the attributes available in that tag |
Figcaption(Object[])
Generate a standard HTML5 <figcaption> tag with optional contents
Declaration
public static Figcaption Figcaption(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Figcaption | A Figcaption object with all the attributes available in that tag |
Figure(Object[])
Generate a standard HTML5 <figure> tag with optional contents
Declaration
public static Figure Figure(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Figure | A Figure object with all the attributes available in that tag |
Footer(Object[])
Generate a standard HTML5 <footer> tag with optional contents
Declaration
public static Footer Footer(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Footer | A Footer object with all the attributes available in that tag |
Form(Object[])
Generate a standard HTML5 <form> tag with optional contents
Declaration
public static Form Form(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Form | A Form object with all the attributes available in that tag |
H1(Object[])
Generate a standard HTML5 <h1> tag with optional contents
Declaration
public static H1 H1(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
H1 | A H1 object with all the attributes available in that tag |
H2(Object[])
Generate a standard HTML5 <h2> tag with optional contents
Declaration
public static H2 H2(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
H2 | A H2 object with all the attributes available in that tag |
H3(Object[])
Generate a standard HTML5 <h3> tag with optional contents
Declaration
public static H3 H3(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
H3 | A H3 object with all the attributes available in that tag |
H4(Object[])
Generate a standard HTML5 <h4> tag with optional contents
Declaration
public static H4 H4(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
H4 | A H4 object with all the attributes available in that tag |
H5(Object[])
Generate a standard HTML5 <h5> tag with optional contents
Declaration
public static H5 H5(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
H5 | A H5 object with all the attributes available in that tag |
H6(Object[])
Generate a standard HTML5 <h6> tag with optional contents
Declaration
public static H6 H6(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
H6 | A H6 object with all the attributes available in that tag |
Head(Object[])
Generate a standard HTML5 <head> tag with optional contents
Declaration
public static Head Head(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Head | A Head object with all the attributes available in that tag |
Header(Object[])
Generate a standard HTML5 <header> tag with optional contents
Declaration
public static Header Header(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Header | A Header object with all the attributes available in that tag |
Hr(Object[])
Generate a standard HTML5 <hr> tag with optional contents
Declaration
public static Hr Hr(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Hr | A Hr object with all the attributes available in that tag |
I(Object[])
Generate a standard HTML5 <i> tag with optional contents
Declaration
public static I I(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
I | A I object with all the attributes available in that tag |
Iframe(Object[])
Generate a standard HTML5 <iframe> tag with optional contents
Declaration
public static Iframe Iframe(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Iframe | A Iframe object with all the attributes available in that tag |
Img(Object[])
Generate a standard HTML5 <img> tag with optional contents
Declaration
public static Img Img(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Img | A Img object with all the attributes available in that tag |
Input(Object[])
Generate a standard HTML5 <input> tag with optional contents
Declaration
public static Input Input(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Input | A Input object with all the attributes available in that tag |
Ins(Object[])
Generate a standard HTML5 <ins> tag with optional contents
Declaration
public static Ins Ins(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Ins | A Ins object with all the attributes available in that tag |
Kbd(Object[])
Generate a standard HTML5 <kbd> tag with optional contents
Declaration
public static Kbd Kbd(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Kbd | A Kbd object with all the attributes available in that tag |
Label(Object[])
Generate a standard HTML5 <label> tag with optional contents
Declaration
public static Label Label(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Label | A Label object with all the attributes available in that tag |
Legend(Object[])
Generate a standard HTML5 <legend> tag with optional contents
Declaration
public static Legend Legend(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Legend | A Legend object with all the attributes available in that tag |
Li(Object[])
Generate a standard HTML5 <li> tag with optional contents
Declaration
public static Li Li(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Li | A Li object with all the attributes available in that tag |
Link(Object[])
Generate a standard HTML5 <link> tag with optional contents
Declaration
public static Link Link(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Link | A Link object with all the attributes available in that tag |
Main(Object[])
Generate a standard HTML5 <main> tag with optional contents
Declaration
public static Main Main(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Main | A Main object with all the attributes available in that tag |
Map(Object[])
Generate a standard HTML5 <map> tag with optional contents
Declaration
public static Map Map(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Map | A Map object with all the attributes available in that tag |
Mark(Object[])
Generate a standard HTML5 <mark> tag with optional contents
Declaration
public static Mark Mark(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Mark | A Mark object with all the attributes available in that tag |
Meta(Object[])
Generate a standard HTML5 <meta> tag with optional contents
Declaration
public static Meta Meta(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Meta | A Meta object with all the attributes available in that tag |
Meter(Object[])
Generate a standard HTML5 <meter> tag with optional contents
Declaration
public static Meter Meter(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Meter | A Meter object with all the attributes available in that tag |
Nav(Object[])
Generate a standard HTML5 <nav> tag with optional contents
Declaration
public static Nav Nav(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Nav | A Nav object with all the attributes available in that tag |
Noscript(Object[])
Generate a standard HTML5 <noscript> tag with optional contents
Declaration
public static Noscript Noscript(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Noscript | A Noscript object with all the attributes available in that tag |
Object(Object[])
Generate a standard HTML5 <object> tag with optional contents
Declaration
public static Object Object(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Object | A Object object with all the attributes available in that tag |
Ol(Object[])
Generate a standard HTML5 <ol> tag with optional contents
Declaration
public static Ol Ol(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Ol | A Ol object with all the attributes available in that tag |
Optgroup(Object[])
Generate a standard HTML5 <optgroup> tag with optional contents
Declaration
public static Optgroup Optgroup(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Optgroup | A Optgroup object with all the attributes available in that tag |
Option(Object[])
Generate a standard HTML5 <option> tag with optional contents
Declaration
public static Option Option(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Option | A Option object with all the attributes available in that tag |
Output(Object[])
Generate a standard HTML5 <output> tag with optional contents
Declaration
public static Output Output(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Output | A Output object with all the attributes available in that tag |
P(Object[])
Generate a standard HTML5 <p> tag with optional contents
Declaration
public static P P(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
P | A P object with all the attributes available in that tag |
Param(Object[])
Generate a standard HTML5 <param> tag with optional contents
Declaration
public static Param Param(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Param | A Param object with all the attributes available in that tag |
Picture(Object[])
Generate a standard HTML5 <picture> tag with optional contents
Declaration
public static Picture Picture(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Picture | A Picture object with all the attributes available in that tag |
Pre(Object[])
Generate a standard HTML5 <pre> tag with optional contents
Declaration
public static Pre Pre(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Pre | A Pre object with all the attributes available in that tag |
Progress(Object[])
Generate a standard HTML5 <progress> tag with optional contents
Declaration
public static Progress Progress(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Progress | A Progress object with all the attributes available in that tag |
Q(Object[])
Generate a standard HTML5 <q> tag with optional contents
Declaration
public static Q Q(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Q | A Q object with all the attributes available in that tag |
RawHtml(Object[])
Simple tag creator for raw source code which doesn't have another tag around it.
Mainly used in function which want to return content which should then be put into html directly
Declaration
public static TagCustom RawHtml(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content |
Returns
Type | Description |
---|---|
TagCustom |
Rp(Object[])
Generate a standard HTML5 <rp> tag with optional contents
Declaration
public static Rp Rp(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Rp | A Rp object with all the attributes available in that tag |
Rt(Object[])
Generate a standard HTML5 <rt> tag with optional contents
Declaration
public static Rt Rt(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Rt | A Rt object with all the attributes available in that tag |
Ruby(Object[])
Generate a standard HTML5 <ruby> tag with optional contents
Declaration
public static Ruby Ruby(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Ruby | A Ruby object with all the attributes available in that tag |
S(Object[])
Generate a standard HTML5 <s> tag with optional contents
Declaration
public static S S(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
S | A S object with all the attributes available in that tag |
Samp(Object[])
Generate a standard HTML5 <samp> tag with optional contents
Declaration
public static Samp Samp(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Samp | A Samp object with all the attributes available in that tag |
Script(Object[])
Generate a standard HTML5 <script> tag with optional contents
Declaration
public static Script Script(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Script | A Script object with all the attributes available in that tag |
Section(Object[])
Generate a standard HTML5 <section> tag with optional contents
Declaration
public static Section Section(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Section | A Section object with all the attributes available in that tag |
Select(Object[])
Generate a standard HTML5 <select> tag with optional contents
Declaration
public static Select Select(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Select | A Select object with all the attributes available in that tag |
Small(Object[])
Generate a standard HTML5 <small> tag with optional contents
Declaration
public static Small Small(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Small | A Small object with all the attributes available in that tag |
Source(Object[])
Generate a standard HTML5 <source> tag with optional contents
Declaration
public static Source Source(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Source | A Source object with all the attributes available in that tag |
Span(Object[])
Generate a standard HTML5 <span> tag with optional contents
Declaration
public static Span Span(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Span | A Span object with all the attributes available in that tag |
Strong(Object[])
Generate a standard HTML5 <strong> tag with optional contents
Declaration
public static Strong Strong(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Strong | A Strong object with all the attributes available in that tag |
Style(Object[])
Generate a standard HTML5 <style> tag with optional contents
Declaration
public static Style Style(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Style | A Style object with all the attributes available in that tag |
Sub(Object[])
Generate a standard HTML5 <sub> tag with optional contents
Declaration
public static Sub Sub(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Sub | A Sub object with all the attributes available in that tag |
Summary(Object[])
Generate a standard HTML5 <summary> tag with optional contents
Declaration
public static Summary Summary(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Summary | A Summary object with all the attributes available in that tag |
Sup(Object[])
Generate a standard HTML5 <sup> tag with optional contents
Declaration
public static Sup Sup(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Sup | A Sup object with all the attributes available in that tag |
Svg(Object[])
Generate a standard HTML5 <svg> tag with optional contents
Declaration
public static Svg Svg(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Svg | A Svg object with all the attributes available in that tag |
Table(Object[])
Generate a standard HTML5 <table> tag with optional contents
Declaration
public static Table Table(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Table | A Table object with all the attributes available in that tag |
TagList(Object[])
Simple tag creator for tags inside it - the wrapper doesn't exist. Mainly used in function which want to return content which should then be put into html directly
Declaration
public static TagList TagList(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content |
Returns
Type | Description |
---|---|
TagList |
Remarks
Added in v03.08
Tbody(Object[])
Generate a standard HTML5 <tbody> tag with optional contents
Declaration
public static Tbody Tbody(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Tbody | A Tbody object with all the attributes available in that tag |
Td(Object[])
Generate a standard HTML5 <td> tag with optional contents
Declaration
public static Td Td(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Td | A Td object with all the attributes available in that tag |
Template(Object[])
Generate a standard HTML5 <template> tag with optional contents
Declaration
public static Template Template(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Template | A Template object with all the attributes available in that tag |
Textarea(Object[])
Generate a standard HTML5 <textarea> tag with optional contents
Declaration
public static Textarea Textarea(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Textarea | A Textarea object with all the attributes available in that tag |
Tfoot(Object[])
Generate a standard HTML5 <tfoot> tag with optional contents
Declaration
public static Tfoot Tfoot(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Tfoot | A Tfoot object with all the attributes available in that tag |
Th(Object[])
Generate a standard HTML5 <th> tag with optional contents
Declaration
public static Th Th(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Th | A Th object with all the attributes available in that tag |
Thead(Object[])
Generate a standard HTML5 <thead> tag with optional contents
Declaration
public static Thead Thead(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Thead | A Thead object with all the attributes available in that tag |
Time(Object[])
Generate a standard HTML5 <time> tag with optional contents
Declaration
public static Time Time(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Time | A Time object with all the attributes available in that tag |
Tr(Object[])
Generate a standard HTML5 <tr> tag with optional contents
Declaration
public static Tr Tr(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Tr | A Tr object with all the attributes available in that tag |
Track(Object[])
Generate a standard HTML5 <track> tag with optional contents
Declaration
public static Track Track(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Track | A Track object with all the attributes available in that tag |
U(Object[])
Generate a standard HTML5 <u> tag with optional contents
Declaration
public static U U(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
U | A U object with all the attributes available in that tag |
Ul(Object[])
Generate a standard HTML5 <ul> tag with optional contents
Declaration
public static Ul Ul(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Ul | A Ul object with all the attributes available in that tag |
Var(Object[])
Generate a standard HTML5 <var> tag with optional contents
Declaration
public static Var Var(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Var | A Var object with all the attributes available in that tag |
Video(Object[])
Generate a standard HTML5 <video> tag with optional contents
Declaration
public static Video Video(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Video | A Video object with all the attributes available in that tag |
Wbr(Object[])
Generate a standard HTML5 <wbr> tag with optional contents
Declaration
public static Wbr Wbr(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content | one or more objects (strings or tags) which will be inside the tag |
Returns
Type | Description |
---|---|
Wbr | A Wbr object with all the attributes available in that tag |