Quotations (<blockquote>, <q>)

0
3K

Quotes are used to display text that is a direct quote from another source. In HTML, there are two main elements for this purpose: <blockquote> and <q>.

<blockquote> Element

The <blockquote> element is used for long, multi-line quotes. It typically includes a block-level quote with indentation and a different background color.

Example:

HTML
<blockquote>
  The only way to do great work is to love what you do. If you haven't found it yet, keep looking. Don't settle.
  <cite>Steve Jobs</cite>
</blockquote>   

Attributes:

  • cite: Specifies the URL of the original source.
  • cite-title: Specifies the title of the original source.

<q> Element

The <q> element is used for short, inline quotes. It is often used for quotes within paragraphs or other inline content.

Example:

HTML
<p>As Einstein said, "<q>Imagination is more important than knowledge.</q>"</p>

Attributes:

  • cite: Specifies the URL of the original source.

Choosing the Right Element:

  • Use <blockquote> for long, multi-line quotes that stand out from the main content.
  • Use <q> for short, inline quotes that are part of the flow of the text.

Additional Considerations:

  • You can nest quotes within quotes using both elements.
  • For more complex quote formatting, consider using CSS styles.

By using <blockquote> and <q>, you can effectively display quotes in your HTML documents, giving proper attribution to the original source and improving the readability of your content.

Like
3
Search
Categories
Read More
Technology
COMPONENTS OF A LAN
A Local Area Network (LAN) is a network that connects computers and other devices within a...
By ALAGAI AUGUSTEN 2024-07-17 17:45:57 0 3K
Technology
Importance of Business Information Systems in Modern Business
Business Information Systems (BIS) are vital to the functioning and success of modern businesses....
By Business Information Systems (BIS) Course 2024-07-31 17:19:12 0 4K
Physics
SEPTA-O-LEVEL PHYSICS SEMINAR SLATED FOR 23RD JUNE 2024 AT ST. JOSEPH OF NAZARETH HIGH SCHOOL KAVULE-KATENDE
https://acrobat.adobe.com/id/urn:aaid:sc:EU:39c1aa82-237a-43bf-ba1a-fbe5223d26f1
By Question Bank 2024-07-14 19:52:41 2 4K
Technology
HTML Tutorial
HTML Tutorial
By Mpatswe Francis 2024-08-17 17:37:28 0 2K
Computer Programming
Functions, Finally, and Custom Exceptions
These three concepts are essential for writing robust and maintainable Python code. Here's a...