HtmlForgeX

API Reference

Class

Anchor

Namespace HtmlForgeX.Tags
Assembly HtmlForgeX
Base HtmlTag

Represents an HTML <a> tag. Use this class to create hyperlinks with optional target, relationship, and styling attributes.

Inheritance

Constructors

Anchor 2 overloads
public Anchor() #

Initializes a new instance of the Anchor class.

public Anchor(String hrefLink, String text = "") #

Initializes a new instance of the Anchor class with a href value.

Parameters

hrefLink System.String requiredposition: 0
URL for the href attribute.
text System.String = "" optionalposition: 1
Optional inner text.

Methods

public Anchor Download(String download) #
Returns: Anchor

Sets the download attribute.

Parameters

download System.String requiredposition: 0
Download value.

Returns

The current Anchor instance.

public Anchor HrefLang(String hreflang) #
Returns: Anchor

Sets the hreflang attribute.

Parameters

hreflang System.String requiredposition: 0
Language code.

Returns

The current Anchor instance.

public Anchor Media(String media) #
Returns: Anchor

Sets the media attribute.

Parameters

media System.String requiredposition: 0
Media attribute value.

Returns

The current Anchor instance.

public Anchor Name(String name) #
Returns: Anchor

Sets the name attribute.

Parameters

name System.String requiredposition: 0
Name value.

Returns

The current Anchor instance.

public Anchor OnClick(String onClick) #
Returns: Anchor

Sets the onclick attribute.

Parameters

onClick System.String requiredposition: 0
JavaScript code to execute.

Returns

The current Anchor instance.

public Anchor Ping(String ping) #
Returns: Anchor

Sets the ping attribute.

Parameters

ping System.String requiredposition: 0
Ping URL.

Returns

The current Anchor instance.

public Anchor ReferrerPolicy(String referrerPolicy) #
Returns: Anchor

Sets the referrerpolicy attribute.

Parameters

referrerPolicy System.String requiredposition: 0
Referrer policy value.

Returns

The current Anchor instance.

public Anchor Rel(String rel) #
Returns: Anchor

Sets the rel attribute.

Parameters

rel System.String requiredposition: 0
Relationship value.

Returns

The current Anchor instance.

public Anchor Target(String target) #
Returns: Anchor

Sets the target attribute.

Parameters

target System.String requiredposition: 0
Target value.

Returns

The current Anchor instance.