WordPress.org

Support

Support » How-To and Troubleshooting » Missing <p> tag on post

Missing <p> tag on post

  • I have noticed that if I place an image in a post, surrounded by a DIV (in this case to allow both image and caption), WP does not place an opening tag at the text following the </div> but it does put a closing p tag at the end. Hence the HTML becomes invalid. Still works OK of course.
    Is placing a div in a post taboo?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do you maybe just need to insert an additional carriage return?

    I guess that might force WP to insert the tag. But then the top of the paragraph wont line up with the top of the image. It’s easy to get round – kill the div and just align the image (lose the caption) but it’s also probably easily fixed in wp.

    You know, I’m having a similar problem–except it’s the reverse. I put my images in a DIV, so WP 2.1 now places a P tag right after the opening DIV, but it doesn’t put the /P before the /DIV. Placing CRs after the opening DIV and before the closing DIV doesn’t fix it. This just started after I upgraded to WP 2.1.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Missing <p> tag on post’ is closed to new replies.
Skip to toolbar