This element causes text to be marked by the browser as a quotation.
The <blockquote>
element is more appropriate for long quotations.
The <q>
denotes content quoted from another source.
The cite
attribute is used to specify the URL of the source document.
<q> |
Yes | Yes | Yes | Yes | Yes |
None.
Attribute | Value | Description |
---|---|---|
cite | URL | Specifies the source URL of the quote |
The <q> tag supports the Global Attributes in HTML.
The <q> tag supports the Event Attributes in HTML.
q { display: inline; } q:before { content: open-quote; } q:after { content: close-quote; }
A demo showing how to use <q> tag.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<q cite="http://en.wikipedia.org/wiki/United_States">
The <dfn title="USA">USA</dfn>
is a federal constitutional republic
comprising fifty states and a federal district.</q>
</p> <!--from ww w. j av a2 s . c o m-->
</body>
</html>