Signup/Sign In


In HTML, the <q> tag stands for Inline quotation.

  • The content enclosed inside <q> tag represents a short inline quotation.

  • In Modern Browsers, it is implemented using quotation marks surrounding the text.

  • For short quotations where there is no need for paragraph breaks, it is recommended to use <q> tag while for long quotations <blockquote> tag is used.

  • Also, this is an Inline Element.

HTML <q> Tag Syntax and Usage

The <q> tag requires both opening (start) tag and closing(end) tag.

Required syntax for the same is given below:

....content here!

HTML <q> Tag Basic Example

Below we have a basic example for a clear understanding of <q> tag:

HTML <q> tag Attributes

<q> tag supports both global and event attributes.

Other Attributes of <q> Tag

cite attribute is the most commonly used attribute of <q> tag and hence the description for the same is given below:-

  • The value of the cite attribute is in the form of a URL that designates a source document or a message for the quoted information.
  • This attribute points to the reference for the quote.

Example of cite attribute

<!DOCTYPE html> 
        <title>HTML q cite Attribute</title>  
    <body style="text-align:center;">  
            HTML <q>cite Attribute  
            <q cite=""> 
            Best Place to Learn coding online 

Default CSS Settings of HTML <q> Tag

q {
  display: inline;

q:before {
  content: open-quote;

q:after {
  content: close-quote;

Browser Support for HTML <q> Tag

Following browsers support this attribute:

  • Firefox 1+

  • Google Chrome 1+

  • Internet Explorer 4+

  • Apple Safari 1+

  • Opera 4+

About the author:
Aspiring Software developer working as a content writer. I like computer related subjects like Computer Networks, Operating system, CAO, Database, and I am also learning Python.