Tag HTML <q>
Contoh
Tandai kutipan singkat:
<p>WWF's goal is to:
<q>Build a future where people live in harmony with nature.</q>
We hope they succeed.</p>
Lebih banyak contoh "Coba Sendiri" di bawah ini.
Definisi dan Penggunaan
Tag <q>
mendefinisikan kutipan singkat.
Browser biasanya menyisipkan tanda kutip di sekitar kutipan.
Tip: Gunakan <blockquote> untuk kutipan panjang.
Dukungan Peramban
Element | |||||
---|---|---|---|---|---|
<q> | Yes | Yes | Yes | Yes | Yes |
Atribut
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the source URL of the quote |
Atribut Global
Tag <q>
juga mendukung Atribut Global dalam HTML .
Atribut Acara
Tag <q>
juga mendukung Atribut Peristiwa dalam HTML .
Lebih Banyak Contoh
Contoh
Gunakan CSS untuk menata elemen <q>:
<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>
Halaman Terkait
Referensi HTML DOM: Objek Kutipan
Pengaturan CSS Default
Sebagian besar browser akan menampilkan <q>
elemen dengan nilai default berikut:
Contoh
q {
display: inline;
}
q:before {
content: open-quote;
}
q:after {
content: close-quote;
}