h1-h6
The h1 to h6 HTML elements represent six levels of headings.
XML Elements |
|
|---|---|
Java Classes |
|
Basics
Use heading elements in level order to express the logical hierarchy of a view’s content:
<h1 text="HTML Tags Sample"/>
<h2 text="Formatting Tags:"/>
<h2 text="Lists:"/>
<h3 text="Ordered List:"/>
<h3 text="Unordered List:"/>
<h2 text="Hyperlinks:"/>
Theme Variants
Use the themeNames attribute to style a heading as a badge. Combine badge with color, emphasis, shape, or size variants.
| Variant | Description | Supported By |
|---|---|---|
|
Applies badge styling. |
Aura, Lumo |
|
Applies a semantic color. |
Aura, Lumo |
|
Adds stronger visual emphasis. |
Aura, Lumo |
|
Rounds the badge corners. |
Aura, Lumo |
|
Makes the badge smaller. |
Aura, Lumo |
|
Uses the regular badge size. |
Aura, Lumo |
Attributes
Common attributes serve the same purpose for all components. The following attributes are specific to headings:
| Name | Description | Default |
|---|---|---|
Applies one or more variants listed in Theme Variants. |
— |
Handlers
Common handlers are configured in the same way for all components. The following handlers are specific to headings:
| Name | Description |
|---|---|
Fires when the heading is clicked. Use the |