Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<p> inside <blockquote> , why? 1

Status
Not open for further replies.

1DMF

Programmer
Jan 18, 2005
8,795
GB
I'm a little confused why I need to put a paragraph tag inside a blockquote tag.

Doesn't make sense to me, I was writing some paragraphs, then needed to add a quote.

blockquote is a block element why does the content then require another block element wrapped round it?

I'm sure it'll make sense to one of you guys!

cheers,
1DMF.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Just seems odd, if I wanted a second part to a quote i'd use another quote just like i'd use another <p> for a paragraph.

because of this you cannot simply apply different CSS to a blockquote vs the default <p> CSS.

I now have to put blockquote p { blah blah }

What your saying is you could have many <p> in a blockquote , when should you use another block quote, when the quote changes subject, the quote is from a different person?

Pesky semantics doing my head in again.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
I would say that the markup should reflect the quote or quotes.

So, if the quote you are putting in your page has one paragraph, you would use:

Code:
<blockquote>
   <p>Para 1</p>
</blockquote>

If the quote has multiple paragraphs, then you would use:

Code:
<blockquote>
   <p>Para 1</p>
   <p>Para 2</p>
   ...
   <p>Para n</p>
</blockquote>

And if there are multiple quotes (form the same person or otherwise), then you would use:

Code:
<blockquote>
   <p>Para 1</p>
   ...
   <p>Para n</p>
</blockquote>

<blockquote>
   <p>Para 1</p>
   ...
   <p>Para n</p>
</blockquote>

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Just seems odd, if I wanted a second part to a quote i'd use another quote just like i'd use another <p> for a paragraph.

Why, if it's the same quote? That doesn't make sense.

You could also be quoting, for example, a list.

Think of blockquote as an equivalent of a div rather than a paragraph. A div is also a block level element, I assume you have no problem putting multiple p tags in a div.

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
Now Now foamy calm down!


Have you thought about using a table, instead?
you what? now your talking ;-)

Seriously guys.....

I could make a quote from within a paragraph, so no I wouldn't expect to break my paragraph to have to blockquote around a seperate paragraph when the quote is part of the paragraph i was originally writing in.

I find it odd that no one else can see this dilema!








"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
I could make a quote from within a paragraph, so no I wouldn't expect to break my paragraph to have to blockquote around a seperate paragraph when the quote is part of the paragraph i was originally writing in.

Aah - now that's a different kettle of fish. When you started talking about blockquotes, I assumed you were using them for their intended purpose.

If you're talking about quotes that are inline (i.e. inside an existing para / sentence), then you wouldn't use blockquote (as its name implies, it's block level). You would instead use the "q" element.

From
These two elements designate quoted text. BLOCKQUOTE is for long quotations (block-level content) and Q is intended for short quotations (inline content) that don't require paragraph breaks.

Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Now Now foamy calm down!

I didn't say that, it was Jeff :)

--
Tek-Tips Forums is Member Supported. Click Here to donate

<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.


 
lol - I was referring to the sarcasm
I assume you have no problem putting multiple p tags in a div.

Dan you're a star, wish I could give you another!

You can see my dilema when I tried to validate the page thinking it was an inline element (ok clue's in the name!) for a quote within a paragraph.

Couldn't understand the semantics, but that was coz i'd got the semantics wrong and was using the wrong tag for the job!

Though I have set the element to display:block, for the formating effect I wanted.

Is that kinda defeating the point?

Also if you were doing a block of quotations, would it be wrong to use ....
Code:
<ul>
<li><q>quotation 1</q></li>
<li><q>quotation 2</q></li>
<li><q>quotation 3</q></li>
</ul>

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
I don't see anything wrong with that for a list of quotations... it's a list, with quotations. I might use blockquote instead of Q for that job, though, given the quotations are not inline (inside a para, etc), but are stand-alone.

Dan




Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Insightful as always :)

Thanks.

"In complete darkness we are all the same, only our knowledge and wisdom separates us, don't let your eyes deceive you."

"If a shortcut was meant to be easy, it wouldn't be a shortcut, it would be the way!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top