Title: Tracking Down an HTML Error
Last modified: August 18, 2016

---

# Tracking Down an HTML Error

 *  [sphyr](https://wordpress.org/support/users/sphyr/)
 * (@sphyr)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/)
 * Sigh. I’m such a novice.
 * I cut and pasted from an old template into my WordPress 1.5.2 installation. Looked
   like it was working fine. Deleted old unnecessary backups.
 * Looks like my page doesn’t validate. I didn’t realize for some time because I
   was using ad-blocking software, set to “ignore errors”. I disabled it the other
   day, and voila, html errors.
 * I’ve tracked it down to something in my sidebar; I suspect I either have a missing
   or an extra [li] tag someplace.
 * Would somebody with a fresh pair of eyes glance at it and see if my error is 
   in an obvious spot? I haven’t been able to find it. 🙁
 * [http://chasingthewind.net](http://chasingthewind.net)

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

 *  [Mark Bloomfield](https://wordpress.org/support/users/yellowllama/)
 * (@yellowllama)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250039)
 * hey there…
 * 1) i can spot a missing `<ul>` here:
 * `<!-- End Theme Switcher -->`
    `<li></li>` `<li class="pagenav"><h2>Pages</h2
   ><ul><li class="page_item">`
 * 2) another missing `<ul>` before this `<li>`:
 * `<li id="calendar"><table id="wp-calendar">`
 * try that and see if you’re still getting errors…
 *  Thread Starter [sphyr](https://wordpress.org/support/users/sphyr/)
 * (@sphyr)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250063)
 * Didn’t work. 🙁
 * I think the [ul] for those are up top at the [div id=”sidebar”]. I re-counted,
   re-paired all the li’s and ul’s in the sidebar.php and they all seem to close,
   but it still doesn’t validate.
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250099)
 * You have 111 errors, not 1.
 * [http://validator.w3.org/check?uri=http%3A%2F%2Fchasingthewind.net%2F](http://validator.w3.org/check?uri=http%3A%2F%2Fchasingthewind.net%2F)
 * Looks like you have some unclosed `<p>` tags and your unclosed `<li>` tags are
   in posts. If you remember to hit the “Close Tags” quicktag before posting, you
   can eliminate some of that. Are you entering those tags manually? WordPress normally
   closes them when it inserts them.
 *  Thread Starter [sphyr](https://wordpress.org/support/users/sphyr/)
 * (@sphyr)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250107)
 * Er, thanks, but that’s not quite it. I’m convinced the 111 errors are actually
   1 misplaced error in the sidebar. Most of those 111 errors occur within the posts
   on the front page, yet if I switch to the default WordPress Kubrick theme, all
   the posts validate with no errors.
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250127)
 * Actually most of the errors are fairly simple things that have nothing to do 
   with the lists. You have a lot of border=0 that should be border=”0″, for example.
   If you fix those, it will be easier to track down the _real_ problem.
 * I cut and pasted just the code from your sidebar in the validator.w3.org “Validate
   by Direct Input” and while it had 50 errors, they were none of them related to`
   <li>` or `<ul>` tags. They were almost entirely things like unescaped ampersands
   in javascripts and things related to the use of tables.
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250129)
 * nevermind.
 *  Thread Starter [sphyr](https://wordpress.org/support/users/sphyr/)
 * (@sphyr)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250191)
 * How do you “paste the code from my sidebar?” That validator doesn’t work on php
   files.
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250275)
 * I don’t have your php file. The php file outputs HTML, which is what the browsers
   actually read and also what any validator that you input your URL into is going
   to see. Or if you click that “Valid XHTML” link on your blog, the validator will
   see the HTML that your server outputs, not the raw PHP file. I just did view 
   page source, copy, paste.
 *  [viper007bond](https://wordpress.org/support/users/viper007bond/)
 * (@viper007bond)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250276)
 * Validate the whole page, not just your sidebar. It won’t correctly determine 
   the document type if you just do partial HTML.
 * Anyway, just use the W3 Validator that was linked to above and do as it suggests.
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250306)
 * ViperBond,Sphyr convinced the error is in his sidebar and is an error related
   to a misplaced list tag of some sort. Sphyr won’t even look at the multiple errors
   elsewhere on the page, which is why I did the validation separately for just 
   the sidebar. But ultimately the solution is to go through and fix the simple 
   things like border=0 instead of border=”0″ in the whole page and get the list
   down to a manageable size.
 * And the validator offers the option to specify the document type.
 *  [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * (@tomhanna)
 * [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250307)
 * Sphyr – if you can change two things it will cut your errors down to 36.
 * In your Header template file change this:
 * `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.
   org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`
 * to
 * `<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
    "http://www.w3.org/
   TR/html4/frameset.dtd">
 * And change this:
 * `<html xmlns="http://www.w3.org/1999/xhtml">`
 * to this:
 * `<html>`

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

The topic ‘Tracking Down an HTML Error’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)
 * [validation](https://wordpress.org/support/topic-tag/validation/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 11 replies
 * 4 participants
 * Last reply from: [tomhanna](https://wordpress.org/support/users/tomhanna/)
 * Last activity: [20 years, 10 months ago](https://wordpress.org/support/topic/tracking-down-an-html-error/#post-250307)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
