Forums

Invalid XHTML for paragraph in table cell (6 posts)

  1. galbaras
    Member
    Posted 3 months ago #

    Trying to validate my site The Motivational Speaker, I get missing closing tags for paragraphs within table cells. I cannot correct this manually, as the post editor simply strips my explicit tags and "corrects" the code, producing again the invalid XHTML.

    See validation results.

  2. esmi
    Member
    Posted 3 months ago #

    Admin/Settings/Writing. Try toggling the "WordPress should correct invalidly nested XHTML automatically" checkbox.

  3. galbaras
    Member
    Posted 3 months ago #

    @esmi Thanks, but not such luck. On or off, I get the same result with a missing </p> before the </td>

  4. esmi
    Member
    Posted 3 months ago #

    Slight tangent but why are you adding <p> tags to table cells? Given that table markup is supposed to be reserved for pure data, paragraph tags have no place within a cell. Cell padding should be accomplished by CSS.

    Just a though but have you tried leaving 1 blank line between your closing </p> and your closing </td>?

  5. galbaras
    Member
    Posted 3 months ago #

    Actually, Wordpress (tinyMCE) is doing this, not me. There are no paragraph tags anywhere, because the post editor takes them out and only puts a blank line between two paragraphs, but when Wordpress creates the XHTML from my post, it replaces some things with paragraph tags.

    As you can see on the site, I have a heading, followed by some text in a table cell. All I do is press Enter after the heading and then restyle the text as paragraph, which makes the editor remove the heading tags, but Wordpress replaces the opening tag later, except it doesn't do the same with the closing tag.

    Me thinks it's a bug.

  6. galbaras
    Member
    Posted 1 month ago #

    Yo, Wordpress developers! How about a little response for the nice man?

Reply

You must log in to post.

About this Topic