Class Link
Generate a standard HTML5 <link> tag
Implements
Inherited Members
Namespace: ToSic.Razor.Html5
Assembly: ToSic.Razor.dll
Syntax
public class Link : Tag<Link>, IRawHtmlString, IHtmlString, IHtmlTag, ITag, IEnumerable<ITag>, IEnumerable
Constructors
| Improve this Doc View SourceLink(Icon, CloneChanges)
Very special internal overload to allow Icons to replicate
Declaration
protected Link(Icon original, CloneChanges changes)
Parameters
Type | Name | Description |
---|---|---|
Icon | original | |
ToSic.Razor.Markup.CloneChanges | changes |
Methods
| Improve this Doc View SourceCrossorigin(String)
Set the crossorigin attribute on the <link> tag
Declaration
public Link Crossorigin(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in crossorigin='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Link | a Link object to enable fluid command chaining |
Href(String)
Set the href attribute on the <link> tag Automatically url-encode it if contains spaces, umlauts or other unexpected chars
Declaration
public Link Href(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in href='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Link | a Link object to enable fluid command chaining |
Hreflang(String)
Set the hreflang attribute on the <link> tag
Declaration
public Link Hreflang(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in hreflang='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Link | a Link object to enable fluid command chaining |
Media(String)
Set the media attribute on the <link> tag
Declaration
public Link Media(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in media='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Link | a Link object to enable fluid command chaining |
Rel(String)
Set the rel attribute on the <link> tag
Declaration
public Link Rel(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in rel='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Link | a Link object to enable fluid command chaining |
Type(String)
Set the type attribute on the <link> tag
Declaration
public Link Type(string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | value | what should be in type='...'. If called multiple times, later values replace the previous value. |
Returns
Type | Description |
---|---|
Link | a Link object to enable fluid command chaining |