Forum Moderators: open

Message Too Old, No Replies

<blockquote> in <p>

what's correct?

         

Gabriele

4:23 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



I've a question: is correct to put a blockquote element inside a p element? in other words, I've this code:

<p>
Friedrich Nietzsche's philosophy rose at the end of
Positivism's fortune. Following his words, Europe was
<blockquote>(thoughts of Nietzsche, very long quotation)
</blockquote>
</p>

Can you give me some references? thanx you all!

tedster

5:15 pm on Aug 30, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here's a legacy thread on the issue, complete with some W3C references. This has been a bit of a knotty issue as you will see.

[webmasterworld.com...]

Gabriele

5:57 pm on Aug 30, 2005 (gmt 0)

10+ Year Member



thank you tedster!
Probably you've right: a <blockquote> should have a <p>
element inside. I'll try with a new validation. Bye :)

Hester

9:59 am on Aug 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think this is only required for document types like XHTML Strict. For loose HTML I don't believe the paragraph tag is required.

tedster

10:48 am on Aug 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think you're right, Hester - but in any doctype, a blockquote cannot currently be nested WITHIN a <p> -- and I believe most rendering engines will automatically assume a </p> when a <blockquote> appears. Then the actual </p> in the code above after the </blockquote> throws an error.

bedlam

3:58 am on Sep 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<p>
Friedrich Nietzsche's philosophy rose at the end of
Positivism's fortune. Following his words, Europe was
<blockquote>(thoughts of Nietzsche, very long quotation)
</blockquote>
</p>

As is often the case with this type of markup question, you can get a pretty good idea of what the correct markup is by thinking about what you'd do if you were just typing the same content on a typewriter or (even better), setting it in type for print.

With the example above, there's little question that you'd insert a carriage return between the words '...Europe was' and the beginning of the quotation - just like you would if you were placing a bulleted list inside a paragraph:

Many of Nietzsche's works have been translated into English. These include:

* The Gay Science
* The Birth of Tragedy
* Human, All Too Human
* Ecce Homo
* On the Genealogy of Morals

Considered by many to be philosophical works of a very high order...

That it is considered correct markup to end a paragraph element before a list or block quotation and continue what is, as far as the meaning of the content is concerned, the same paragraph after the list or quotation shows that the <p> element in HTML is more closely related to the paragraph as used in typography (i.e. a chunk of text bounded by linebreaks) than it is to how a writer thinks of a paragraph (i.e. a set of related sentences).

It's also a pretty good indication (in spite of all the recent fuss over semantic markup [google.ca]) of HTML's relative semantic poverty, but that may be a topic for another thread...

-B

Hester

8:21 am on Sep 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sorry, I misunderstood the question.

Any quotes inside a paragraph should, of course, be inline. For that, you would use the Q tag.