Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

html
communitycreator

What is the <q> element in HTML?

Arslan Bajwa

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

In HTML, the <q> element is used to display inline text in quotation marks.

Syntax

<q cite=""> quotation content </q>

Where:

  • cite: Takes URL as its value and specifies the source of the content to be quoted.
  • This element should only be used for short quotations without any paragraph breaks. For long quotations with paragraph breaks, you should use the <blockquote> element.
  • Modern browsers usually insert quotation marks around the quotation specified by <q>.

Example

The following code demonstrates the usage of the <q> element in HTML. The content that we want to display as a quotation is written within the opening and closing tags, <q> and </q>.

  • HTML

RELATED TAGS

html
communitycreator

Grokking Modern System Design Interview for Engineers & Managers

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

Keep Exploring