Support » Themes and Templates » Help with XHTML and CSS validation

  • Resolved guyadams


    I recently upgraded my wordpress installation to 2.3 and move the whole lot to a new domain and host. Before the the site was valid XHTML 1.0 transitional but now it appears not. I have added a few plugins since the move.

    Details can be found here

    Also the CSS has always had an error which I would like to resolve, details here

    I’m pretty new to PHP and web dev and would like a little advice on how to clear up these errors, mainly the XHTML ones.

    Many thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • <img src="xxxx.jpg" alt="Picture of myself" />

    Never forget the “alt”. The text “Picture of myself” will be shown, if the picture is unable to load.

    And your CSS file has too many warnings to explain them all 😛

    Is this a new requirement? Does wordpress not do this automatically? (or should it?)

    So from now on I have to manually add ALT=”picture_text_if_missing” to all the photo uploads I make to wordpress?

    Many thanks for your response so far.

    I have added the alts to the recent photos which cured some of the errors. I then removed the wordpress tag cloud from the side bar and the rest of the errors have gone. The code that I used for the tag cloud was this:

    <?php if ( function_exists(‘wp_tag_cloud’) ) : ?>

  • <h2>Tags</h2>

      <?php wp_tag_cloud(‘smallest=8&largest=16&number=150’); ?>
  • <?php endif; ?>

    That is the code according to this wordpress document

    So why would it fail XHTML validation and is there a way I can alter it to make it work correctly? For now I have taken it down.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help with XHTML and CSS validation’ is closed to new replies.