Constructor HtmlElement
- Namespace
- TinyComponents
- Assembly
- TinyComponents.dll
HtmlElement()
Initializes a new instance of the HtmlElement class with no container HTML element.
public HtmlElement()
HtmlElement(string)
Initializes a new instance of the HtmlElement class with the specified tag name.
public HtmlElement(string tagName)
Parameters
tagName
stringThe name of the tag to be used for the HTML element. The tag name will be converted to lowercase.
HtmlElement(string, object?)
Initializes a new instance of the HtmlElement class with the specified tag name and content.
public HtmlElement(string tagName, object? content)
Parameters
tagName
stringThe name of the tag to be used for the HTML element. The tag name will be converted to lowercase.
content
objectOptional parameter that defines content for the creating HTML tag.
HtmlElement(string, string?)
Initializes a new instance of the HtmlElement class with the specified tag name and content.
public HtmlElement(string tagName, string? content)
Parameters
tagName
stringThe name of the tag to be used for the HTML element. The tag name will be converted to lowercase.
content
stringOptional parameter that defines content for the creating HTML tag.
HtmlElement(string, Action<HtmlElement>)
Initializes a new instance of the HtmlElement class with the specified tag name.
public HtmlElement(string tagName, Action<HtmlElement> content)
Parameters
tagName
stringThe name of the tag to be used for the HTML element. The tag name will be converted to lowercase.
content
Action<HtmlElement>Optional parameter that defines content for the creating HTML tag.