HTML <q> -tag
Voorbeeld
Markeer een korte offerte:
<p>WWF's goal is to:
<q>Build a future where people live in harmony with nature.</q>
We hope they succeed.</p>
Meer "Probeer het zelf" voorbeelden hieronder.
Definitie en gebruik
De <q>
tag definieert een korte offerte.
Browsers plaatsen normaal gesproken aanhalingstekens rond het citaat.
Tip: Gebruik <blockquote> voor lange citaten.
Browserondersteuning
Element | |||||
---|---|---|---|---|---|
<q> | Yes | Yes | Yes | Yes | Yes |
attributen
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the source URL of the quote |
Algemene kenmerken
De <q>
tag ondersteunt ook de Global Attributes in HTML .
Gebeurteniskenmerken
De <q>
tag ondersteunt ook de Event Attributes in HTML .
Meer voorbeelden
Voorbeeld
Gebruik CSS om het <q>-element op te maken:
<html>
<head>
<style>
q {
color: gray;
font-style: italic;
}
</style>
</head>
<body>
<p>WWF's goal is to:
<q>Build a
future where people live in harmony with nature.</q>
We hope they succeed.</p>
</body>
</html>
Gerelateerde pagina's
HTML DOM-referentie: Quote Object
Standaard CSS-instellingen
De meeste browsers geven het <q>
element weer met de volgende standaardwaarden:
Voorbeeld
q {
display: inline;
}
q:before {
content: open-quote;
}
q:after {
content: close-quote;
}