A

public struct A: Html

A wrapper for the HTML ‘a’ element.

  • The HTML string generated for the content of this element.

    Declaration

    Swift

    public var html: String
  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(_ klass: [String], _ id: String?, _ href: String, _ target: String?, _ content: [Html])

    Parameters

    klass

    The CSS class names that can be used to configure this element

    id

    The CSS id name that can be used to configure this element

    href

    The URL that is linked to

    target

    The value for the target attribute

    content

    The content for this element

  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(klass: [String] = [], href: String, target: String? = nil, _ content: [Html])

    Parameters

    klass

    (Optional) The CSS class names that can be used to configure this element

    href

    The URL that is linked to

    target

    (Optional) The value for the target attribute

    content

    The content for this element

  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(klass: [String] = [], href: String, target: String? = nil, _ content: Html...)

    Parameters

    klass

    (Optional) The CSS class names that can be used to configure this element

    href

    The URL that is linked to

    target

    (Optional) The value for the target attribute

    content

    The content for this element

  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(klass: String, href: String, target: String? = nil, _ content: [Html])

    Parameters

    klass

    The CSS class name that can be used to configure this element

    href

    The URL that is linked to

    target

    (Optional) The value for the target attribute

    content

    The content for this element

  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(klass: String, href: String, target: String? = nil, _ content: Html...)

    Parameters

    klass

    The CSS class name that can be used to configure this element

    href

    The URL that is linked to

    target

    (Optional) The value for the target attribute

    content

    The content for this element

  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(id: String, href: String, target: String? = nil, _ content: [Html])

    Parameters

    id

    The CSS id name that can be used to configure this element

    href

    The URL that is linked to

    target

    (Optional) The value for the target attribute

    content

    The content for this element

  • Create a new ‘a’ element.

    Declaration

    Swift

    public init(id: String, href: String, target: String? = nil, _ content: Html...)

    Parameters

    id

    The CSS id name that can be used to configure this element

    href

    The URL that is linked to

    target

    (Optional) The value for the target attribute

    content

    The content for this element