Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Hong Jin
71 PointsHow to embed a <blockquote> element within a <q> element in a paragraph?
I wrote a code like this:
<p>
<q>
I was told a story:
<blockquote>
story
</blockquote>
I don't believe it.
</q>
</p>
It is supposed to look like this:
"I was told a story:
story
I don't believe it."
But the closing quotation mark ends in the first line:
"I was told a story:"
story
I don't believe it.
How can I fix this?
2 Answers
geoffrey
28,736 PointsWhy would you use the q tag inside the blockquote ? q is for short quote, while blockquote is for long quote. And why would you surround "I was told a story with quotes", as It's not part of the quote ... Maybe I'm wrong but what I would do is something like that.
On my side, check this fiddle, you could as well take a look at this link to html5 doctor for better comprehension here.
geoffrey
28,736 PointsI tested your html snippet and it seems the closing quotation mark ends rightly at the end. check here;
Hong Jin
71 PointsThat's true. I forgot to mention that the q element is in a p element. And when I put the entire quotation between p tags, it doesn't work. It's really strange.
Hong Jin
71 PointsHong Jin
71 PointsThanks Geoffrey. The entire text is a quote from someone, who in turn quotes another story. The story is put in a blockquote because it's pretty long, but the person's own words are pretty short so I put them between q tags. The end product should look like this:
"I was told a story:
story
I don't believe it." ----someone