treehouse : what would you like to learn today?
Web Design Web Development iOS Development

Problems with Markup Validation

  • Hi,

    i found your page with google and I must say it looks very nice. I watched all your screencasts... wonderful. I am actually also a web designer, but not so good as you.

    So my problem is the following. I have a wordpress setup with my own theme. Today I checked my page with the W3C Markup Validator (http://validator.w3.org/) and fixed some problems. But I have 12 problems and 6 warnings where I don't know whats wrong.

    All the problems refers to this code for my flickr thumbs:


    <script type=\"text/javascript\">

    $(document).ready(function(){

    $.getJSON(\"http://api.flickr.com/services/feeds/photos_public.gne?ids=13608382@N06&lang=en-us&format=json&jsoncallback=?\",
    function(data){
    $i = 0;
    $.each(data.items,
    function(index, item){
    if($i <= 7)
    {
    $(\"<img alt='flickr'/>\").attr(\"src\", item.media.m).addClass(\"thumb\").appendTo(\".flickrpics\").wrap(\"<a href='\" + item.link + \"'></a>\").wrap(\"<div class='flickr-thumb' />\");

    $i++;
    }
    });
    });
    });
    </script>


    Hope you can help me. My page is http://www.andre-neuborn.de.

    Thanks!

    bye,
    ANeuby
  • replace all your & with &amp;

    that should fix some of the issues

    hope it helps
  • Wow thanks. But now i have 5 errors remaining. How can I fix this?

    For example, the first error. I have included the alt entity in the img tag but w3c says no. And then it says there cannot be an img tag. How can I escape that?

    bye,
    ANeuby
  • try removing the alt"flickr" let me know if that works
  • Okay I changed it but it does not work. Now I have 5 problems and it also says that there must be an alt entity.


    Hmm, sorry now I saw that the flickr thumbs does not coming up. So the thing with replace & with &amp; does also not work!
  • Now it works fine! You only need to put the code into an extra javascript file and add it in the header.

    bye,
    ANeuby