listdad  

Re: [WSG] blockquote in xhtml strict

Dylan Lindgren
Sun, 11 Feb 2007 20:02:38 -0800

Hi,

Just did some research and found this:
http://www.w3schools.com/tags/tag_blockquote.asp

Differences Between HTML and XHTML

The <blockquote> tag is supposed to contain only block-level elements
within it, and not just plain text.

To validate the page as strict XHTML, you must add a block-level element
around the text within the <blockquote> tag, like this:

<blockquote>
<p>here is a long quotation here is a long quotation</p>
</blockquote>

Hope this helps.

Dylan.


On 2/12/07, Tee G. Peng <[EMAIL PROTECTED]> wrote:

Hi, I have a block of text that uses blockquote

u
"I came because this is one of the best......"
- john doe


in my markup:
<div>
<img src="images/jd.jpg" alt="john doe" width="83" height="58" />
<blockquote>"I came because this is one of the best......"
<span>- john doe</span>

   </blockquote>

It gives me validation error:
You have used character data somewhere it is not permitted to appear.
Mistakes that can cause this error include putting text directly in
the body of the document without wrapping it in a container element
(such as a <p>aragraph</p>) or forgetting to quote an attribute value
(where characters such as "%" and "/" are common, but cannot appear
without surrounding quotes).

After some reading about 'blockquote' element in xhtml strict from
google search, I added <p> tag and removed the <span>

<p><blockquote>"I came because this is one of the best......"
<span>- john doe</span>

   </blockquote>
</p>

now it gives me this:

The mentioned element is not allowed to appear in the context in
which you've placed it; the other mentioned elements are the only
ones that are both allowed there and can contain the element
mentioned. This might mean that you need a containing element, or
possibly that you've forgotten to close a previous element.

One possible cause for this message is that you have attempted to put
a block-level element (such as "<p>" or "<table>") inside an inline
element (such as "<a>", "<span>", or "<font>").


What am I missing?

Thanks!

tee






*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************




*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************