W3C XHTML compliancy problems

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

W3C XHTML compliancy problems

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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..
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post 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>
User avatar
Skittlewidth
Forum Contributor
Posts: 389
Joined: Wed Nov 06, 2002 9:18 am
Location: Kent, UK

Post by Skittlewidth »

but <h5> is a block element as well.
User avatar
raghavan20
DevNet Resident
Posts: 1451
Joined: Sat Jun 11, 2005 6:57 am
Location: London, UK
Contact:

Post 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. :?
Post Reply