Title: XHTML Validation Help
Last modified: August 19, 2016

---

# XHTML Validation Help

 *  Resolved [dcthree](https://wordpress.org/support/users/dcthree/)
 * (@dcthree)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/)
 * Hello,
 * I have spent hours trying desperately to solve this XHTML discrepency and would
   love a hand if anyone can spare the time.
 * I am relatively new to XHTML so please just state the obvious if I am simply 
   stupid! : )
 * I have two main errors that I am getting when validating; the errors are shown
   subsequent to each piece of code below: the site is [http://www.dcthree.co.uk](http://www.dcthree.co.uk)(
   view it in firefox as I have not edited for I.E. yet)
 * (If you go to the W3C validation service: <ahref=”[http://validator.w3.org/”&gt](http://validator.w3.org/”&gt);
   you can view the errors when typing in my url: [http://www.dcthree.co.uk](http://www.dcthree.co.uk))
 * 1) `#page { background: url("http://www.dcthree.co.uk/wp-content/themes/DCThree`
   The # is the error here
 * 2) `</style>` The > is the error here
 * I have in total 29 errors although 90% of them are simply for `<` or `>` if anyone
   knows how to fix these plese let me know as I fear I won’t have any hair left
   in 24hrs!
 * Many thanks,
 * Nick

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

 *  [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * (@rosecitysister)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/#post-815155)
 * Your style tag is wrong:
 * `<style type="text/css" media="screen"/>`
 * You’ve closed it. It should be:
 *     ```
       <style type="text/css" media="screen">
       ```
   
 *  [RoseCitySister](https://wordpress.org/support/users/rosecitysister/)
 * (@rosecitysister)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/#post-815156)
 * However, fixing that doesn’t fix your errors – now I see 44 errors. 🙁
 *  Thread Starter [dcthree](https://wordpress.org/support/users/dcthree/)
 * (@dcthree)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/#post-815158)
 * okay… thats weird…
 * I had 29 errors and proceeded to take out the forward slash and now I have 44…
   LOVELY! : )
 * Thanks so much for trying ma city sista! lol… I really appreciate it!
 * Does anybody else have the faintest idea whats going wrong here!
 * The code that RoseCitySister tried to fix is from my header.php:
 * `<style type=”text/css” media=”screen”>
 * <?php
    // Checks to see whether it needs a sidebar or not if ( !empty($withcomments)&&!
   is_single() ) { ?>
 * <?php } else { // No sidebar ?>
    #page { background: url(“<?php bloginfo(‘stylesheet_directory’);?
   >/images/dcthreebgwide.jpg”) repeat-y top; border: none; } <?php } ?>
 * </style>`
 * > I have been playing around with it all night/morning and still cant fix the
   > error on this line…
 * `<style type="text/css" media="screen">`
 * > The `>` symbol is the error…
   > Pleeeease help,
   > Many thanks again,
   > Nick
 *  Thread Starter [dcthree](https://wordpress.org/support/users/dcthree/)
 * (@dcthree)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/#post-815159)
 * Hahaha… obviously a forum professional too… lol… the boxes were supposed to be
   around the code : )
 * Thats how much I need HELP!! lol : )
 *  [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/#post-815160)
 * [Current validation errors](http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.dcthree.co.uk%2F).
 * You can’t put a style block in the body of the page – it needs to be in the head
   section.
 * Also, there’s no such element as an h9. 🙂
 * There are several other basic validation errors here that I’d suggest you squash–
   especially if you’re offering web design and SEO.
 * IMO, you should be very comfortable figuring out what you can, and can’t, do 
   in code and how to troubleshoot your own errors if you’re offering these services
   to customers.
 * Hope that helps.

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

The topic ‘XHTML Validation Help’ is closed to new replies.

 * 5 replies
 * 3 participants
 * Last reply from: [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/xhtml-validation-help/#post-815160)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
