Title: XHTML validation problem
Last modified: August 18, 2016

---

# XHTML validation problem

 *  [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * (@tjinh200)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/)
 * **wp version** 1.5
    **link:** [http://www.tjinh200.com/tjinh200/](http://www.tjinh200.com/tjinh200/)**
   problem occurring:** on all pages
 * the validation results show:
 * Line 186, column 9: document type does not allow element "li" here; missing one
   of "ul", "ol" start-tag
 * <li><li><a href="[http://tjinh200.com/tjinh200/wp-register.php">Register</a></l](http://tjinh200.com/tjinh200/wp-register.php">Register</a></l)
 * the only place i can find “Register” is in my sidebar, which after checking multiple
   times, does not have a duplicate ` <li> ` tag …
 * any thoughts?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [oriecat](https://wordpress.org/support/users/oriecat/)
 * (@oriecat)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156478)
 * Did you manually add an `<li>`, if so remove it, because I believe the function
   automatically adds it in.
 * For example, in the default theme, it says
 * `<ul>
    <?php wp_register(); ?> <li><?php wp_loginout(); ?></li>
 * so it looks like you need the li on loginout, but now on register
 *  Thread Starter [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * (@tjinh200)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156479)
 * oh … i’ll try …
 *  [Lorelle](https://wordpress.org/support/users/lorelle/)
 * (@lorelle)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156480)
 * Well, it must be there, cuz it’s finding it. Ah, I know, if you have nested lists,
   the “secondary” list set must be in a UL.
 * So if you have something like:
 * `<li><?php wp_list_pages() ?></li>`
 * You will get the error because it needs to be:
 * `<li>
    <ul><?php wp_list_pages() ?> </ul> </li>
 * Get it?
 * The opening and closing elements of the list are missing and therefore you are
   getting two LI next to each other.
 *  Thread Starter [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * (@tjinh200)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156483)
 * taking the ` <il> ` out still won’t allow it to validate for some reason …
 * adding the ` <ul> ` works but adds a few spaces before the actual text, how can
   i remove those extra spaces? …
 *  Thread Starter [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * (@tjinh200)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156487)
 * correction above …
 *  Thread Starter [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * (@tjinh200)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156489)
 * very odd, it’s returning two “li” tags … but in my index.php it shows only:
 * **shown in my index.php:** ` <li> <ul><?php wp_register(); ?></ul> </li> `
 * **shown in view source and validation page:** ` 
    <li> <ul> <li><a href="http://
   tjinh200.com/tjinh200/wp-admin/">Site Admin</a></li> </ul> </li>
 *  Thread Starter [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * (@tjinh200)
 * [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156491)
 * correction: not sure why, but tried just taking out the “il” tags again, and 
   it validated, thank you 🙂

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘XHTML validation problem’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 3 participants
 * Last reply from: [tjinh200](https://wordpress.org/support/users/tjinh200/)
 * Last activity: [21 years, 3 months ago](https://wordpress.org/support/topic/xhtml-validation-problem-1/#post-156491)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
