Page 1 of 1

W3C XHTML compliancy problems

Posted: Wed Oct 19, 2005 7:56 pm
by raghavan20
1. Is it not allowed to use h5 inside a p tag in the middle of a document?
I have this error coming up but h5 is only inside another block-level element, p.
You can have a look at the file here

Code: Select all

Error  Line 364 column 7: document type does not allow element "h5" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag.

				<h5>Integrating our own or third-party shopping cart with Paypal</h5>

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>").

2. Normally, I see that & in parameters have to be made as &
Do you guys normally explicitly make & as & or do you any other alternative?

Code: Select all

ini_set('arg_separator.output','&');
This only allows you to put & when concatenating session value in URL.

Posted: Wed Oct 19, 2005 8:36 pm
by feyd
:roll: the last sentance of your quote answers your first question.... :?

As for your second question, I explicitly do it for all inline hardcoded query strings, but use automated means for any dynamic/foreign links..

Posted: Thu Oct 20, 2005 5:28 am
by raghavan20
This is an excerpt of the document...do you there is a problem?
you can see h5 is inside a p block. I dont see a violation there.

Code: Select all

<div id ="div11" style="clear:both;">
			<b>PHP</b><br />
			<p>
				<h5>Integrating our own or third-party shopping cart with Paypal</h5>
				<a href="http://raghavan.100webcustomers.com/paypal/paypal_ecommerce_example.php">Try the example</a><br />
				<ul>
					<li>Shopping all items in your site</li>
					<li>Employing third-party or our own shopping cart</li>
					<li>Passing shipping and pricing details of each item to Paypal</li>
					<li>Check out and pay at Paypal by clicking the Paypal/customized check out button</li>
					<li>Capability to view the shopping cart at Paypal</li>
					<li>Paypal calculates the final price by adding product pricing & shipping/handling details</li>
					<li>Pay/Cancel the payment at Paypal and return back to our site for further processing</li>
				</ul>
			</p>
</div>

Posted: Thu Oct 20, 2005 6:56 am
by Skittlewidth
but <h5> is a block element as well.

Posted: Thu Oct 20, 2005 7:31 am
by raghavan20
I understand that h5 is inside a p block-level element.
But if it's wrong,,,then it infers that you can not put div, table and p tags inside the body tag. :?