<aside>: Das Aside-Element
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
Das <aside>
HTML-Element repräsentiert einen Abschnitt eines Dokuments, dessen Inhalt nur indirekt mit dem Hauptinhalt des Dokuments in Zusammenhang steht. Asides werden häufig als Seitenleisten oder hervorgehobene Boxen dargestellt.
Probieren Sie es aus
<p>
Salamanders are a group of amphibians with a lizard-like appearance, including
short legs and a tail in both larval and adult forms.
</p>
<aside>
<p>The Rough-skinned Newt defends itself with a deadly neurotoxin.</p>
</aside>
<p>
Several species of salamander inhabit the temperate rainforest of the Pacific
Northwest, including the Ensatina, the Northwestern Salamander and the
Rough-skinned Newt. Most salamanders are nocturnal, and hunt for insects,
worms and other small creatures.
</p>
aside {
width: 40%;
padding-left: 0.5rem;
margin-left: 0.5rem;
float: right;
box-shadow: inset 5px 0 5px -5px #29627e;
font-style: italic;
color: #29627e;
}
aside > p {
margin: 0.5rem;
}
Attribute
Dieses Element enthält nur die globalen Attribute.
Verwendungshinweise
- Verwenden Sie das
<aside>
-Element nicht zum Markieren von eingeklammertem Text, da solche Texte als Teil des Hauptflusses gelten.
Beispiele
Verwendung von <aside>
In diesem Beispiel wird <aside>
verwendet, um einen Absatz in einem Artikel zu kennzeichnen. Der Absatz steht nur indirekt im Zusammenhang mit dem Hauptinhalt des Artikels:
<article>
<p>
The Disney movie <cite>The Little Mermaid</cite> was first released to
theatres in 1989.
</p>
<aside>
<p>The movie earned $87 million during its initial release.</p>
</aside>
<p>More info about the movie…</p>
</article>
Ergebnis
Technische Zusammenfassung
Inhaltskategorien | Flussinhalt, Abschnittsinhalt, fühlbarer Inhalt. |
---|---|
Erlaubter Inhalt | Flussinhalt. |
Tag-Auslassung | Keine, sowohl Start- als auch End-Tag sind obligatorisch. |
Erlaubte Eltern |
Jedes Element, das
Flussinhalt akzeptiert. Beachten Sie, dass ein <aside> -Element kein Nachfahre eines <address> -Elements sein darf.
|
Implizite ARIA-Rolle |
complementary
|
Zulässige ARIA-Rollen |
feed , none ,
note , presentation ,
region , search
|
DOM-Schnittstelle | [`HTMLElement`](/de/docs/Web/API/HTMLElement) |
Spezifikationen
Specification |
---|
HTML # the-aside-element |