html_compose.attributes.a_attrs
1from . import BaseAttribute 2from ..base_types import Resolvable, StrLike 3 4 5class AnchorAttrs: 6 """ 7 This module contains functions for attributes in the 'a' element. 8 Which is inherited by a class so we can generate type hints 9 """ 10 11 @staticmethod 12 def download(value: StrLike) -> BaseAttribute: 13 """ 14 "a" attribute: download 15 Whether to download the resource instead of navigating to it, and its filename if so 16 17 Args: 18 value: 19 Text 20 21 Returns: 22 An download attribute to be added to your element 23 24 """ 25 26 return BaseAttribute("download", value) 27 28 @staticmethod 29 def href(value) -> BaseAttribute: 30 """ 31 "a" attribute: href 32 Address of the hyperlink 33 34 Args: 35 value: 36 Valid URL potentially surrounded by spaces 37 38 Returns: 39 An href attribute to be added to your element 40 41 """ 42 43 return BaseAttribute("href", value) 44 45 @staticmethod 46 def hreflang(value) -> BaseAttribute: 47 """ 48 "a" attribute: hreflang 49 Language of the linked resource 50 51 Args: 52 value: 53 Valid BCP 47 language tag 54 55 Returns: 56 An hreflang attribute to be added to your element 57 58 """ 59 60 return BaseAttribute("hreflang", value) 61 62 @staticmethod 63 def ping(value: Resolvable) -> BaseAttribute: 64 """ 65 "a" attribute: ping 66 URLs to ping 67 68 Args: 69 value: 70 Set of space-separated tokens consisting of valid non-empty URLs 71 72 Returns: 73 An ping attribute to be added to your element 74 75 """ 76 77 return BaseAttribute("ping", value) 78 79 @staticmethod 80 def referrerpolicy(value) -> BaseAttribute: 81 """ 82 "a" attribute: referrerpolicy 83 Referrer policy for fetches initiated by the element 84 85 Args: 86 value: 87 Referrer policy 88 89 Returns: 90 An referrerpolicy attribute to be added to your element 91 92 """ 93 94 return BaseAttribute("referrerpolicy", value) 95 96 @staticmethod 97 def rel(value: Resolvable) -> BaseAttribute: 98 """ 99 "a" attribute: rel 100 Relationship between the location in the document containing the hyperlink and the destination resource 101 102 Args: 103 value: 104 Unordered set of unique space-separated tokens* 105 106 Returns: 107 An rel attribute to be added to your element 108 109 """ 110 111 return BaseAttribute("rel", value) 112 113 @staticmethod 114 def target(value) -> BaseAttribute: 115 """ 116 "a" attribute: target 117 Navigable for hyperlink navigation 118 119 Args: 120 value: 121 Valid navigable target name or keyword 122 123 Returns: 124 An target attribute to be added to your element 125 126 """ 127 128 return BaseAttribute("target", value) 129 130 @staticmethod 131 def type(value) -> BaseAttribute: 132 """ 133 "a" attribute: type 134 Hint for the type of the referenced resource 135 136 Args: 137 value: 138 Valid MIME type string 139 140 Returns: 141 An type attribute to be added to your element 142 143 """ 144 145 return BaseAttribute("type", value)
6class AnchorAttrs: 7 """ 8 This module contains functions for attributes in the 'a' element. 9 Which is inherited by a class so we can generate type hints 10 """ 11 12 @staticmethod 13 def download(value: StrLike) -> BaseAttribute: 14 """ 15 "a" attribute: download 16 Whether to download the resource instead of navigating to it, and its filename if so 17 18 Args: 19 value: 20 Text 21 22 Returns: 23 An download attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("download", value) 28 29 @staticmethod 30 def href(value) -> BaseAttribute: 31 """ 32 "a" attribute: href 33 Address of the hyperlink 34 35 Args: 36 value: 37 Valid URL potentially surrounded by spaces 38 39 Returns: 40 An href attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("href", value) 45 46 @staticmethod 47 def hreflang(value) -> BaseAttribute: 48 """ 49 "a" attribute: hreflang 50 Language of the linked resource 51 52 Args: 53 value: 54 Valid BCP 47 language tag 55 56 Returns: 57 An hreflang attribute to be added to your element 58 59 """ 60 61 return BaseAttribute("hreflang", value) 62 63 @staticmethod 64 def ping(value: Resolvable) -> BaseAttribute: 65 """ 66 "a" attribute: ping 67 URLs to ping 68 69 Args: 70 value: 71 Set of space-separated tokens consisting of valid non-empty URLs 72 73 Returns: 74 An ping attribute to be added to your element 75 76 """ 77 78 return BaseAttribute("ping", value) 79 80 @staticmethod 81 def referrerpolicy(value) -> BaseAttribute: 82 """ 83 "a" attribute: referrerpolicy 84 Referrer policy for fetches initiated by the element 85 86 Args: 87 value: 88 Referrer policy 89 90 Returns: 91 An referrerpolicy attribute to be added to your element 92 93 """ 94 95 return BaseAttribute("referrerpolicy", value) 96 97 @staticmethod 98 def rel(value: Resolvable) -> BaseAttribute: 99 """ 100 "a" attribute: rel 101 Relationship between the location in the document containing the hyperlink and the destination resource 102 103 Args: 104 value: 105 Unordered set of unique space-separated tokens* 106 107 Returns: 108 An rel attribute to be added to your element 109 110 """ 111 112 return BaseAttribute("rel", value) 113 114 @staticmethod 115 def target(value) -> BaseAttribute: 116 """ 117 "a" attribute: target 118 Navigable for hyperlink navigation 119 120 Args: 121 value: 122 Valid navigable target name or keyword 123 124 Returns: 125 An target attribute to be added to your element 126 127 """ 128 129 return BaseAttribute("target", value) 130 131 @staticmethod 132 def type(value) -> BaseAttribute: 133 """ 134 "a" attribute: type 135 Hint for the type of the referenced resource 136 137 Args: 138 value: 139 Valid MIME type string 140 141 Returns: 142 An type attribute to be added to your element 143 144 """ 145 146 return BaseAttribute("type", value)
This module contains functions for attributes in the 'a' element. Which is inherited by a class so we can generate type hints
12 @staticmethod 13 def download(value: StrLike) -> BaseAttribute: 14 """ 15 "a" attribute: download 16 Whether to download the resource instead of navigating to it, and its filename if so 17 18 Args: 19 value: 20 Text 21 22 Returns: 23 An download attribute to be added to your element 24 25 """ 26 27 return BaseAttribute("download", value)
"a" attribute: download Whether to download the resource instead of navigating to it, and its filename if so
Args: value: Text
Returns: An download attribute to be added to your element
29 @staticmethod 30 def href(value) -> BaseAttribute: 31 """ 32 "a" attribute: href 33 Address of the hyperlink 34 35 Args: 36 value: 37 Valid URL potentially surrounded by spaces 38 39 Returns: 40 An href attribute to be added to your element 41 42 """ 43 44 return BaseAttribute("href", value)
"a" attribute: href Address of the hyperlink
Args: value: Valid URL potentially surrounded by spaces
Returns: An href attribute to be added to your element
46 @staticmethod 47 def hreflang(value) -> BaseAttribute: 48 """ 49 "a" attribute: hreflang 50 Language of the linked resource 51 52 Args: 53 value: 54 Valid BCP 47 language tag 55 56 Returns: 57 An hreflang attribute to be added to your element 58 59 """ 60 61 return BaseAttribute("hreflang", value)
"a" attribute: hreflang Language of the linked resource
Args: value: Valid BCP 47 language tag
Returns: An hreflang attribute to be added to your element
63 @staticmethod 64 def ping(value: Resolvable) -> BaseAttribute: 65 """ 66 "a" attribute: ping 67 URLs to ping 68 69 Args: 70 value: 71 Set of space-separated tokens consisting of valid non-empty URLs 72 73 Returns: 74 An ping attribute to be added to your element 75 76 """ 77 78 return BaseAttribute("ping", value)
"a" attribute: ping URLs to ping
Args: value: Set of space-separated tokens consisting of valid non-empty URLs
Returns: An ping attribute to be added to your element
80 @staticmethod 81 def referrerpolicy(value) -> BaseAttribute: 82 """ 83 "a" attribute: referrerpolicy 84 Referrer policy for fetches initiated by the element 85 86 Args: 87 value: 88 Referrer policy 89 90 Returns: 91 An referrerpolicy attribute to be added to your element 92 93 """ 94 95 return BaseAttribute("referrerpolicy", value)
"a" attribute: referrerpolicy Referrer policy for fetches initiated by the element
Args: value: Referrer policy
Returns: An referrerpolicy attribute to be added to your element
97 @staticmethod 98 def rel(value: Resolvable) -> BaseAttribute: 99 """ 100 "a" attribute: rel 101 Relationship between the location in the document containing the hyperlink and the destination resource 102 103 Args: 104 value: 105 Unordered set of unique space-separated tokens* 106 107 Returns: 108 An rel attribute to be added to your element 109 110 """ 111 112 return BaseAttribute("rel", value)
"a" attribute: rel Relationship between the location in the document containing the hyperlink and the destination resource
Args: value: Unordered set of unique space-separated tokens*
Returns: An rel attribute to be added to your element
114 @staticmethod 115 def target(value) -> BaseAttribute: 116 """ 117 "a" attribute: target 118 Navigable for hyperlink navigation 119 120 Args: 121 value: 122 Valid navigable target name or keyword 123 124 Returns: 125 An target attribute to be added to your element 126 127 """ 128 129 return BaseAttribute("target", value)
"a" attribute: target Navigable for hyperlink navigation
Args: value: Valid navigable target name or keyword
Returns: An target attribute to be added to your element
131 @staticmethod 132 def type(value) -> BaseAttribute: 133 """ 134 "a" attribute: type 135 Hint for the type of the referenced resource 136 137 Args: 138 value: 139 Valid MIME type string 140 141 Returns: 142 An type attribute to be added to your element 143 144 """ 145 146 return BaseAttribute("type", value)
"a" attribute: type Hint for the type of the referenced resource
Args: value: Valid MIME type string
Returns: An type attribute to be added to your element