Interface IHtmlTagsService
The service to generate HTML Tags.
Tip
This is the new, recommended way of generating tags, as it's better and functional
Warning
This looks almost the same as the static ToSic.Razor.Blade.Tag
but there is a crucial difference
The APIs return functional IHtmlTag
objects.
This is safer and more future proof, but you may run into surprises.
Example:
// Old Tag API - these two objects will be the same
var tagOld = ToSic.Razor.Blade.Tag.Div();
var tagOldWithId = tagOld.Id(...).Style(...).Class(...);
// now tagOld and tagOldWithId are both the same objects with all changes applied
// New API - assumes tagSvc is IHtmlTagsService
// these two objects will NOT be the same
var tag = tagSvc.Div();
var tagWithId = tag.Id(...).Style(...).Class(...);
// now tag is still an empty div-tag
// while tagWithId is the tag wth everything set on
Namespace: ToSic.Razor.Blade
Assembly: ToSic.Razor.dll
Syntax
public interface IHtmlTagsService
Remarks
Methods
| Improve this Doc View SourceA(Object[])
Generate a standard HTML5 <a> tag with optional contents
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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)
Create a HTML comment with something inside.
Declaration
Comment Comment(string content = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | content | optional content to place within the tag - usually a string |
Returns
Type | Description |
---|---|
Comment | HtmlString of the tag, so you can use it directly with @HtmlTag.Comment(...) in your razor |
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
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 |
Data(Object[])
Generate a standard HTML5 <data> tag with optional contents
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
Icon(String, String, Int32, String)
Declaration
Icon Icon(string path, string rel = null, int size = 0, string type = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | path | |
System.String | rel | |
System.Int32 | size | |
System.String | type |
Returns
Type | Description |
---|---|
Icon |
Iframe(Object[])
Generate a standard HTML5 <iframe> tag with optional contents
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
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 |
MetaOg(String, String)
Generate a open-graph Meta tag.
Declaration
MetaOg MetaOg(string property = null, string content = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | property | |
System.String | content |
Returns
Type | Description |
---|---|
MetaOg |
Remarks
Important: This is a specialized meta tag. The API to create it is different from most tags, as it has name/content parameters.
Meter(Object[])
Generate a standard HTML5 <meter> tag with optional contents
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |
ScriptJsonLd(Object)
Create a JsonLd Script tag and automatically json-serialize the object inside it
Declaration
ScriptJsonLd ScriptJsonLd(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | an object which will be json serialized |
Returns
Type | Description |
---|---|
ScriptJsonLd |
ScriptJsonLd(String)
Create a JsonLd Script
Declaration
ScriptJsonLd ScriptJsonLd(string json)
Parameters
Type | Name | Description |
---|---|---|
System.String | json | the contents in the tag, usually JSON |
Returns
Type | Description |
---|---|
ScriptJsonLd |
Section(Object[])
Generate a standard HTML5 <section> tag with optional contents
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
TagList TagList(params object[] content)
Parameters
Type | Name | Description |
---|---|---|
System.Object[] | content |
Returns
Type | Description |
---|---|
TagList |
Tbody(Object[])
Generate a standard HTML5 <tbody> tag with optional contents
Declaration
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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 |