HasLabel
API reference › HTML Attribute › HasLabel
Used by 3 types
Provides an immutable API for the label attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/option#label.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
label() | Sets the label attribute. | HasLabel |
Method details
Section titled “Method details”label()
Section titled “label() ”public function label(string|Stringable|UnitEnum|null $value): staticSets the label attribute.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Label text, or null to remove the attribute. |
Returns
static: New instance with the updated label attribute.