HTML Quote Generator
WM-37Type the quoted text, add a source and a cite address, and copy a blockquote inside a figure, or an inline q element.
Runs in your browser. Nothing is uploaded.
Quoted text (optional lines: cite:, source:, lang:)
HTML
How to use it
- Type the quotation. Separate paragraphs with a blank line.
- Add cite: for the web address and source: for the visible credit.
- Choose blockquote or q.
- Copy the markup.
Where the attribution goes
The text of a blockquote should be only the quote. Who said it belongs outside the blockquote, and the standard way to do that is a figure with a figcaption, which is what the source: line produces. The cite attribute holds the web address the quote came from. Browsers do not display it, and most assistive technology ignores it, so it is not a substitute for visible credit.
q is for short inline quotes
The q element is for a short quotation inside a sentence. Browsers add the opening and closing quotation marks themselves, using the language of the page, so typing your own would double them. Longer quotations of a paragraph or more belong in blockquote, where each paragraph sits in its own p element. The tool does not check that your quote is accurate or who said it, so confirm that yourself.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Type the text for the element above the key: value lines. | There was no quoted text. | Type the quote above the key: value lines. |
Questions people ask
How do I quote someone in HTML?
For a long quote, use blockquote, with each paragraph inside a p. Put the source in a figcaption in a surrounding figure. For a few words inside a sentence, use q.
What is the cite attribute on blockquote?
A web address pointing to the source of the quote. It is not shown on the page by browsers, so also give a visible link or credit.
Do I need to type quotation marks inside q?
No. The browser draws them for you, and they follow the language of the page. Typing your own results in doubled marks. The marks also adapt to the language set with lang, so nested quotes alternate styles in many browsers.
What is the difference between blockquote and q?
blockquote is a block-level element for longer quotations. q is inline and for short ones inside text. Both can carry the cite attribute. Pick by length and by whether the quote needs its own block on the page, not by the look.
How do I style a blockquote?
With CSS. Browsers indent it by default, and many sites add a left border or larger text. The generated markup has no styles of its own.
About this tool
The blockquote action puts each paragraph (split on blank lines) in a p inside <blockquote>. With a source: line the blockquote moves into a figure with a figcaption, which is the way to show who said it; the figcaption is visible text. The cite: address goes in the cite attribute, which browsers do not show and screen readers usually skip, so put a visible source too. The q action writes one inline <q>, uses cite: but ignores source:; browsers add the quotation marks themselves, so do not type them. Quoted text is escaped. The tool does not check that your quote is accurate. javascript: addresses are refused. Optional lines: id:, class:, title:, lang:, data-* and aria-*.