Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Flexible Images Part One; Vector Graphics.

Hi, can someone provide me with some help regarding the above code challenge?

The task states;

Swap out <img src=”img/love-at-first-bite.gif alt=”Love at First Bite”> tag with the correct HTML markup to instead bring in an love-at-first-bite.svg, located in the same β€œimg” folder.

After removing the current img tag, my HTML is as follows;

<div class="grid_2 omega">
         <object data="img/love-at-first-bite.svg" type="img/svg+xml"     class="chart">
            <a href="img/love-at-first-bite.svg">
              <img src="img/love-at-first-bite.gif" alt="Love At First Bite">
            </a>
         </object>
</div>

After clicking 'Check My Work', I get told there is a syntax error but the life of me I can't find it. Any help would be greatly appreciated.

Many Thanks

2 Answers

You were so very close, the correct type for an svg object is image/svg+xml not img/svg+xml

Thanks very much, James.