HTML tutorial
CSS3 tutorial
Bootstrap tutorial
JavaScript tutorial
JQuery tutorial
AngularJS tutorial
React tutorial
NodeJS tutorial
PHP tutorial
Python tutorial
Python3 tutorial
Django tutorial
Linux tutorial
Docker tutorial
Ruby tutorial
Java tutorial
C tutorial
C ++ tutorial
Perl tutorial
JSP tutorial
Lua tutorial
Scala tutorial
Go tutorial
ASP.NET tutorial
C # tutorial
Mark up a short quotation
The <q>
tag defines a short quotation.
Browsers normally insert quotation marks around the quotation.
Element | |||||
---|---|---|---|---|---|
<q> | Yes | Yes | Yes | Yes | Yes |
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the source URL of the quote |
The <q>
tag also supports the Global Attributes in HTML.
The <q>
tag also supports the Event Attributes in HTML.
Use CSS to style the <q> element:
<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>
HTML DOM reference: Quote Object
Most browsers will display the <q>
element with the following default values:
q {
display: inline;
}
q:before {
content: open-quote;
}
q:after {
content: close-quote;
}