HasContent
API reference › HTML Attribute › HasContent
Used by 1 type
Provides an immutable API for the content attribute.
See also: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/content.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
content() | Sets the content attribute. | HasContent |
Method details
Section titled “Method details”content()
Section titled “content() ”public function content(string|Stringable|UnitEnum|null $value): staticSets the content attribute.
Defines the metadata value for the current name or http-equiv entry.
Parameters
| Parameter | Type | Description |
|---|---|---|
$value | string|Stringable|UnitEnum| | Metadata content value, or null to remove the attribute. |
Returns
static: New instance with the updated content attribute.