ASWCode Tutorials

Learn Web Development - From Basics to Advanced

HTML Quotations & Special Elements

Learn how to use some special HTML elements for quotations, addresses, abbreviations, citations, and text direction.

1. Block Quotation <blockquote>

Used for long quotes, usually on its own block.

<blockquote>
  "The journey of a thousand miles begins with a single step."
</blockquote>
"The journey of a thousand miles begins with a single step."

2. Short Inline Quote <q>

Used for short quotes inside text. Browser adds quotation marks automatically.

<p>He said <q>HTML is fun!</q> and smiled.</p>

He said HTML is fun! and smiled.

3. Abbreviation <abbr>

Use <abbr> to show abbreviations. You can add a full form with the title attribute.

<p>The <abbr title="HyperText Markup Language">HTML</abbr> tutorial is easy.</p>

The HTML tutorial is easy.

4. Address <address>

Use <address> to display contact information or addresses.

<address>
  John Doe
123 Main Street
New York, USA </address>
John Doe
123 Main Street
New York, USA

5. Citation <cite>

Use <cite> to reference the source of a quote, book, or article.

<p>“Knowledge is power.” <cite>- Francis Bacon</cite></p>

“Knowledge is power.” - Francis Bacon

6. Text Direction <bdo>

Use <bdo> to override text direction. For example, right-to-left (rtl) or left-to-right (ltr).

<p>Normal text: Hello!</p>
<p>Reversed text: <bdo dir="rtl">Hello!</bdo></p>

Normal text: Hello!

Reversed text: Hello!

Next Lesson → HTML Colors

Previous Lesson → HTML Text Formatting

← Back