CKTIS / HTML
HTML-Element: address
Das Kontaktelement kennzeichnet Kontaktdaten des Autors oder Eigentümers des nächsten selbstständigen Abschnitts, nicht jede Postadresse.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<address>contact information for the nearest article or body</address>address gilt für den nächsten Vorfahren article oder ohne solchen für body; es beschreibt keine unbeteiligten Personen.
Das Inhaltsmodell von address schließt Überschriften und Abschnittsinhalt aus; außerdem verbietet es Nachfahrenelemente address, header und footer.
Es kann Name, Organisation und funktionierende Links mailto: oder tel: enthalten; eine reine Ortsadresse ohne Kontaktrolle benötigt es nicht.
Das Beispiel setzt address in einen Artikel, bestimmt mit closest() den Eigentümer und beobachtet das Schema mailto:.
Beispiele
<!doctype html>
<meta charset="utf-8">
<article id="release">
<h2>Release notes</h2>
<address id="contact">Maintained by <a href="mailto:docs@example.test">Documentation team</a></address>
</article>
<output id="result"></output>
<script>
const contact = document.querySelector("#contact");
const link = contact.querySelector("a");
document.querySelector("#result").textContent = `owner=${contact.closest("article").id}; links=${contact.querySelectorAll("a").length}; scheme=${link.protocol}; text=${link.textContent}`;
</script>
Ergebnis
owner=release; links=1; scheme=mailto:; text=Documentation team
Das Ergebnis bestätigt DOM-Beziehung und Kontakt-URL; es sendet nichts und bewertet keine Vollständigkeit.