Support » Themes and Templates » What’s with XHTML and <p> tags?

  • OK, I see this alot.

    document type does not allow element “p” here; missing one of “object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag

    the idea is I have a .postpic, based crudely on photomatt.net’s .postthumbs, so I can embed a a pic with a caption in a post.
    But if I do p class=”postpic” inside the post, suddenly the xhtml validator gets annoyed with all the p tags in the page. I tried putting /p before p class… to make sure there was closing tag for the previous p because I know wordpress puts them in but doesn’t display them in the post editor. No luck there. If use a div tag in the post, the xhtml validator still gets mad – in fact, it doesn’t really like me doing almost any marking up in a post.
    Why does XHTML do these things?

Viewing 5 replies - 1 through 5 (of 5 total)
  • dave,
    Could you post a link to the site in question so others can have a peek at it?
    Craig.

    Oh yeah, that would help, wouldn’t it… sorry:
    http://silkworms.chinesetriad.org/index.php?p=14#more-14
    That’s the post in question.

    That’s exactly my problem; I try to add the close tag in the post editor, either by simply pressing carriage return, or typing /p explicitly. Either way, it doesn’t stick. The editor doesn’t save it, it just disappears and the problem persists.
    I’m running WordPress 1.0, in case you were wondering.

    Dave,
    Here I go again… <slaps forehead> re-reading your original post I see that you described the problem perfectly well. I’m not sure exactly what has caused this, but I personally have had similar validation issues. Basically I used DreamWeaver to directly edit the page, and it seemed to fix the problem. I wish I knew what the cause was, but I do also know that it doesn’t happen often. I wonder if there is some kind of hidden escape character or some stupid thing in there making a mess of it.
    Craig.

    Do you have use_balanceTags turned on under Options->General Blog Settings? In general I find that things like this tend to wonk up any entries that have real HTML formatting code in them, so I always turn them off. If you already have it turned off, then there must be something else in the post clean-up/replacement code that is breaking stuff.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.