Quotation and Citation Elements in HTML

In HTML, there are multiple elements that are used for Quotation and Citation and these are:

  • <blockquote>
  • <q>
  • <abbr>
  • <address>
  • <cite>
  • <bdo>

HTML <blockquote> Element

The <blockquote> tag in HTML is used to indicate a section of text that is quoted from another source. The text within the <blockquote> tags will be indented and typically displayed in a slightly different style to set it apart from the rest of the document. The <blockquote> tag should include a source citation using the cite attribute and the footer tag.

Example:

<p>Quote for the day:</p>
<blockquote cite="https://en.wikipedia.org/wiki/Steve_Jobs">
   <p>Innovation distinguishes between a leader and a follower.</p>
</blockquote>
Output:
blockquote tag in HTML

HTML <q> Element

The <q> tag in HTML is used to define smaller quotations and it is displayed by quotation marks around the quote.

Example:
<p>Quote for the day:</p>
<p><q>Programming is like any other sport.</q></p>
Output:
q tag in HTML

HTML <abbr> Element.

The <abbr> tag in HTML is used to indicate an abbreviation or acronym. The tag should include the full form of the term in the title attribute, which will be displayed as a tooltip when a user hovers over the abbreviation.

Example:
<p>The <abbr title="World Wide Web">WWW</abbr> was invented in 1989.</p>
Output:

The WWW was invented in 1989.

In this example, "WWW" is the abbreviation, and "World Wide Web" is the full form of the term. When a user hovers their cursor over the "WWW" it will show the full form of "World Wide Web"


HTML <address> Element

The <address> tag is used to provide contact information for the document or the nearest article or section. It typically contains information such as the author's name, email address, and physical address. 
The text within the <address> tag is typically rendered in italics by web browsers. The <address> tag should be used within the <body> section of an HTML document and can be placed anywhere within the document. (alert-passed)
Example:
<body>
    <address>
      Written by Mohan Dev.<br />
      Visit us at:<br />
      Example.com<br />
      Box 564, Delhi<br />
      INDIA
    </address>
</body>
Output:
address tag in HTML

HTML <cite> Element

The <cite> tag is used to indicate the title of a creative work, such as a book, poem, play, song, movie, or painting. It is typically used to cite the source of a quote or reference in an HTML document. 

The text within the <cite> tag is typically rendered in italics by web browsers. The <cite> tag should be used within the <body> section of an HTML document.

Example:
<p>As Shakespeare wrote in his play <cite>Hamlet</cite>, "To be or not to be, that is the question."</p>
Output:
cite in HTML

HTML <bdo> Element

The <bdo> (bidirectional override) tag is used to change the direction of the text display. It is used to override the default bidirectional behavior of text, which is determined by the Unicode bidirectional algorithm. 

The dir attribute is used to specify the direction of the text and can have values of "ltr" (left-to-right) or "rtl" (right-to-left). The text within the <bdo> tag will be displayed in the specified direction, regardless of the surrounding text.

Example:
<p>This text is left-to-right: <bdo dir="ltr">Hello World!</bdo></p>
<p>This text is right-to-left: <bdo dir="rtl">Hello World!</bdo></p>
Output:
bdo tag in HTML


⚡ Please share your valuable feedback and suggestion in the comment section below or you can send us an email on our offical email id ✉ algolesson@gmail.com. You can also support our work by buying a cup of coffee ☕ for us.

Similar Posts

No comments:

Post a Comment


CLOSE ADS
CLOSE ADS