Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTML5 block-quote with author

Tags:

html

quote

Hi I'm seeing a great number of different ways to implementat blockquote in html but it doesn't seem clear in its documentation how should I properly format a blockquote let's say of a famous quote and metion its author like:

In victory, you deserve Champagne, in defeat, you need it.

Napoleon Bonaparte

What would the correct format of that be in HTML5?

Should the author be inside or outside the blockquote tag? Should it be inside the cite attribute? (even knowing the documentation specifies an URI , not author)

like image 589
zanona Avatar asked Mar 28 '11 14:03

zanona


People also ask

How do you write a quote with an author in HTML?

It must include the title of the work or the name of the author(person, people or organization) or an URL reference, which may be in an abbreviated form as per the conventions used for the addition of citation metadata."

How do you do a block quote in HTML?

HTML <blockquote> tag is used to define a block of text which is quoted from another source. The Browser usually displays the content within <blockquote> tag as indented text. If you want to insert a long quote then use <blockquote> and for short or inline quote use <q> tag.

Is blockquote deprecated in html5?

The non-semantic use of the blockquote element purely to indent text has been deprecated by the W3C (World Wide Web Consortium) since HTML 4.


1 Answers

I googled about this and it looks like <figure> and <figcaption> should do the job:

<figure>   <blockquote cite="https://developer.mozilla.org/samples/html/figure.html">     Quotes, parts of poems can also be a part of figure.   </blockquote>   <figcaption>MDN editors</figcaption> </figure> 

https://developer.mozilla.org/samples/html/figure.html

<figure>   <blockquote cite="http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-figure-element">     The figure element represents some flow content, optionally with a caption,     that is self-contained and is typically referenced as a single unit from the     main flow of the document.   </blockquote>   <figcaption>asdf</figcaption> </figure> 

http://www.w3.org/html/wg/drafts/html/master/grouping-content.html#the-figure-element

like image 149
iGEL Avatar answered Oct 01 '22 21:10

iGEL