Забудьте ленивая инициализация , это слишком проблематично. Это - простое решение:
public class A {
private static final A INSTANCE = new A();
private A() {}
public static A getInstance() {
return INSTANCE;
}
}
<!DOCTYPE html>
<blockquote>
<p>Quote
</blockquote>
<p>Author
будет наиболее правильным.
You are correct in your assumption that a quote is supposed to go into a blockquote
element and that the cite
attribute should be used for the URI. Personally I handle the author of the quote with a separate div
or p
at the bottom of the quote like so:
<blockquote cite="http://a.uri.com/">
<p>This is a really insightful sentence.</p>
<p class="quoteCite">Darko Z</p>
</blockquote>
Then I just use CSS to make it look nice. Pretty basic. You might want to go look at Microformats.org as well and search around for ideas.
Hope this helps
EDIT: Its late and it slipped my mind but you could also use the cite
element
<blockquote cite="http://a.uri.com/">
<p>This is a really insightful sentence.</p>
<cite>Darko Z</cite>
</blockquote>
but im not a 100% sure how well its supported, to be honest
EDIT 2: According to the HTML 5 draft, cite shoudn't be an author name so for future proofing you probably shouldn't use cite for that purpose.
Если вы спрашиваете, как это должно быть семантически размечено, да, используйте цитату блока, и да, атрибут cite предназначен для URL-адресов. Что касается презентации, вы можете использовать все, что хотите, и соответствующим образом оформить ее.
Посетители никогда не увидят разницы, если не посмотрят исходный код, и я не могу представить, что это повлияет на SEO.
Возможно, вам будет интересно использовать формат hReview - по слухам, Google поддерживает его, и он в значительной степени применим к вашей ситуации, в зависимости от того, только вы интересует внешний вид, или вы также хотите облегчить машинное считывание.