Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <q> Tag

The <q> tag marks short, in-line quotations.

The quotations is surrounded by double quotes on either side.

Example

#

A <q> tag marking a quote from the novel Harry Potter.

The quote Happiness can be found even in the darkest of times if one only remembers to turn on the light by Albus Dumbledore was from the novel Harry Potter.

<p style="max-width:550px;">
   The quote <q>Happiness can be found even in the darkest 
   of times if one only remembers to turn on the light</q> 
   by Albus Dumbledore was from the novel Harry Potter.
</p>
q = quote

Using <q>

The <q> tag is an inline element for short quotations.

This element surrounds the quote with "quotation marks".

For longer quotations use the blockquote tag.

More Examples

A <q> tag with a poem by Shakespeare.

To be, or not to be, that is the question
-- by William Shakespeare.

<p>
  <q>To be, or not to be, that is the question</q> 
  <br />
  -- by William Shakespeare.
</p>

Attributes for <q>

This table lists the <q> attributes.

Attribute Value Description
cite URL Quote source URL
id   identifier Defines a unique identifier for the q element.
class   classnames Sets one or more CSS classes to be applied to the q element.
style   CSS-styles Sets the style for the q element.

For additional global attributes see our global attributes list.


Browser support

Here is when <q> support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like


Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides