Ahmar Ali
Ahmar Ali

Reputation: 551

HTML validation :document type does not allow element

It has been an hour since I started finding a solution but so far no luck. I am sure that it is just a matter of some missing tag or something but despite my efforts unable to find the issue. The page is located at: http://contestlancer.com/greenFields/?page_id=47 and I am getting 114 validation errors all same as title of the thread on all <p> and <h2> tags in the document.

Here is the validation results link: CLick here And here is a JS fiddle containing HTML Code:

http://jsfiddle.net/fz6m6/

Upvotes: 0

Views: 59

Answers (2)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201568

The problem was (at least) that you had p elements that lacked a closing tag </p>, which is not allowed in XHTML, and the page declares an XHTML doctype.

Upvotes: 0

Niet the Dark Absol
Niet the Dark Absol

Reputation: 324630

<p> elements may not contain <div> elements (or indeed any block-level element).

Upvotes: 2

Related Questions