I have 3 testimonials that I'm going to use in a website I'm working on. I've read up on block-quotes and I believe that this is the tag best suited for them.
Here is a basic blockquote I found on a forum:
<blockquote>
<p>Pellensque.</p>
<p>Pellentesque.</p>
<p class="credit"><cite>Name</cite>, Title</p>
</blockquote>
Is it semantically correct to use the cite tag to state a person's name and title?
I read that its intended use is to point to the original URL source of the quote.
Also, when inspecting some site's html, I found one that used an h3 for the quotation and h6 for the name and title. Is this in line with best practice?
Or is it better to adjust the text purely in CSS with line-weight and other properties?
I read that its intended use is to point to the original URL source of the quote.
That would be the cite attribute of the <blockquote> element. See here in the HTML5 spec. What you're looking at is the <cite> element, for which marking up the title or author (as demonstrated) of a quotation is appropriate.
Also, when inspecting some site's html, I found one that used an h3 for the quotation and h6 for the name and title. Is this in line with best practice?
If the headings are part of the quotation, then marking up those headings with the respective h elements is fine, as you're reproducing the headings as-is. However, a citation is not a heading, so using a heading to mark up a citation is inappropriate.
Other than that, the <blockquote> element is ideal for marking up testimonials.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With