HTML <s> Tag Tutorial - Usage, Syntax,
Attributes and Example

calender-iconPublished: 15 May 2025

clock-icon5-min read





INTRODUCTION

The HTML <q> element is used when you have to include short inline quotation. Quotation is text or speech written by some author. By default it is shown by browser by surrounding the text in quotation marks. This element should be used for short quotations only; for long quotations use the HTML <blockquote> element.

Syntax:

<q> --TEXT-- </q>

Example:


<p> 
Walt Disney – <q>If you can dream it, you can do it.</q>
</p>

Walt Disney – If you can dream it, you can do it.



Tag Omission

The HTML <q> element must have have both start tag and end tag.

ATTRIBUTES

1. cite

cite attribute's value is URI of resource that contains reference/information about the blockquote. (Example: A link to webpage)

Example:


<p> 
Walt Disney – <q cite="https://www.example.com>If you can dream it, you can do it.</q>
</p>

Frequently Asked Questions(FAQ)

What is the Difference Between HTML q Tag, blockquote tag and cite tag ?
The HTML blockquote element is used for long quotations that are typically displayed as a separate block of text. By default, browsers apply indentation to blockquote.

The HTML q - Inline Quotation element is used for short, inline quotes within a paragraph. Browsers automatically add quotation marks around the text.

The HTML cite element is used to reference the title of a creative work, such as a book, article, movie, or painting. It is rendered in italics by default.
Is the <q> tag same as adding double quotes manually in html?
The <q> tag tells the browser (and assistive technologies like screen readers) that the text inside is an inline quotation. Simply adding "quotes manually" around text doesn't provide any special meaning to the browser — it's just text styling, not semantics.