• Hi. Apologies if this is in the wrong section. I have the following code, which is working fine. However validation does not seem to like it.

    The code is

    <div class="post" id="post-<?php the_ID(); ?>">

    I get validation errors from the loop such as..


    Error Line 125 column 33: document type does not allow element “div” here; missing one of “object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag.

    <div class=”post” id=”post-236″>

    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 “” or “<table>”) inside an inline element (such as ““, “<span>”, or “<font>”).

Viewing 1 replies (of 1 total)
  • The message is saying that the line you have printed, whilst ok in itself, is not ok in the context of the whole page.

    To help you further you will need to provide the site url.

Viewing 1 replies (of 1 total)
  • The topic ‘Validation errors’ is closed to new replies.