WordPress.org

Ready to get started?Download WordPress

Forums

XHTML not valid using <ul> (4 posts)

  1. rezmuh
    Member
    Posted 8 years ago #

    Hi guys,
    I have a problem with my WordPress 2.0.2. Every time I have <ul> tag in my WordPress, the generated code will result in <ul></p>
    . What happens is that the end of the previous paragraph will only use <br /> and then it will not be closed with </p>
    . Instead, when the <ul> starts, it then closes with </p> from previous paragraph.

    I tried to edit this in the HTML editor, but it looks fine. The entry looks like:

    First paragraph

    <ul>
    <li>List 1</li>
    <li>List 2</li>
    </ul>

    So the error only comes up after I submit the post. You can see the example of the post from: http://razorblade.or.id. Can someone help me out with this? I think I noticed it wasn't a problem in WordPress 1.5

  2. Use a double line break before the <ul> like this:

    This is some text.

    <ul>
    <li>Item 1</li>
    <li>Item 2</li>
    </ul>

    More text

    Works fine for me. If it still doesn't for you, disable the WYSIWYG editor as it sucks IMO.

  3. rezmuh
    Member
    Posted 8 years ago #

    Hey, after I disabled the WYSIWYG editor, my HTMl code looked exactly the way you showed me. It's just that after I press submit, it seems that WordPress generates more html tags. You can check http://validator.w3.org/check?uri=http%3A%2F%2Frazorblade.or.id%2F for some errors.

    Thanks for helping me out :)

  4. Deactivate any plugins and see if that fixes it?

    It works fine for me and it produces valid XHTML.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags