Most Likely Cause and Fix
Your markup contains a
<div> element in a place
it does not belong.
The validator is telling you that the
must be inside a
What This Error Means
HTML is often comprised of elements nested inside other elements, such as the placing of an anchor within a paragraph:
<p> Hello <a href="http://example.com">World!</a> </p>
There are rules regarding which elements can be nested inside other elements and when this is allowed to happen.
Most notably, block-level elements, such as
are not allowed inside inline elements such as
This error relates to the when and is telling you that the
<div> element on the relevant line number
is not allowed unless inside a
How To Fix It
The specific error message you encountered will refer to a line and column number. This will guide you to the exact point in your markup to which the error relates.
<div> element in question and check to see what
element it is inside of.
With respect to the specific portion of the document referred to by the given line
and column number, the troublesome
<div> must be
Check that you haven't closed a
<button> element too soon
and make sure that the
<div> is inside a