WordPress.org

Ready to get started?Download WordPress

Forums

validator XHTML problem with <p> & <ul> (5 posts)

  1. kennygunie
    Member
    Posted 9 years ago #

    Hello,
    I discover WP, since 3 days. It's the best blog soft I never know: nice, fast, many plugin, easy to customize...
    I have just a problem with the validator XHTML which I don't know how to fix, and hope some peoples here can help me to find the solution :)
    Here is my validation result
    There are 2 error types:
    1/ document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    I don't have any <p/> in all my blog, so I dont understant where that comme and make error in the blog? :( Are there some thing to change in the templates or main files? I'm using WP 1.5.1.2

    2/ document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
    Do I put something wrong in the "ul" and "li" tag?

    Thank you :)

  2. crowspeaker
    Member
    Posted 9 years ago #

    Here's the rendered source for line 131:

    131: <p><p><a href="http://kennygunie.online.fr/dreamgirls/dg-photos/index.php?show_heading=detail&dir=Cameron%20Diaz&photo=19&dim=640"><img src="http://kennygunie.online.fr/dreamgirls/dg-photos/photos/Cameron%20Diaz/400/Cameron%20Diaz%2019.jpg" alt="Cameron Diaz " /></a><br />

    First off, you have two opening paragraph tags and you don't seem to close them anywhere. This is probably in your template file since it repeats for each post on the page (look in the loop where it pulls the text for the post).

    The second error is related to the first. You have open paragraph tags and you're nesting the ul tag inside them. The validator has freaked out because the tags aren't closed and because ul's don't belong inside paragraphs.

    Hope that helps.

  3. Kafkaesqui

    Posted 9 years ago #

    1. In your template(s) see if you have tags surrounding the_content() tag:

    <?php the_content(); ?>

    These are not required (the_content() format post content to include tags automatically), and should be removed.

    2. <ul> tags should not be nested in <span>.

  4. kennygunie
    Member
    Posted 9 years ago #

    Thank you Crowspeaker and Kafkaesqui,

    to Crowspeaker: these "p""p", is not me who create them... you can see my html code of Cameron Diaz post here... That why I supected there are something to change in the template of WP to correct that in my first post.

    to Kafkaesqui:
    - Can u precise where can I find the function the_content() please. I searched in all templates in my themes directory but no result.
    - " "ul" tags should not be nested in "span"" I thought that too, but when I delete those "span" I dont have less error :( (I had 16 erros before the delete, here is my new validation result)

  5. kennygunie
    Member
    Posted 9 years ago #

    Hello,
    I found where the problem, hust because the uncompatible between Markdown and Textile 1 plugin... I'm using now only Markdown and my page is valided :) (there a plugin to remove this uncompatibility, but I don't use usually Textile so desactivate it is more simple)
    Hope this help someone who have the same prob :)
    and welcome to my website :)

Topic Closed

This topic has been closed to new replies.

About this Topic