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

HTML SVG Basics Introduction to SVG Create an SVG Image

SVG Basics

Add the file star.svg to the page using the <img> element. The file is located inside the img folder.

<!DOCTYPE html>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Scalable Vector Graphics</title>
    <link rel="stylesheet" href="css/normalize.css">
    <link rel="stylesheet" href="css/main.css">

    <h1>SVG Example</h1>

    <div class="wrapper">

      <!-- Add your code below this line -->



4 Answers

Lulu Ruiz
Lulu Ruiz
5,939 Points

<img src="img/star.svg" alt="Star inside the web">

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

You can add an SVG image using the <img> just the same as any other image.

You just need the .svg extension and make sure it's linked inside the img folder which is of course relative to the documents location.

Good luck :)

it is looking for:

 <img src="img/star.svg">

<img scr="img /star.svg"alt=include in the web"> but it keeps saying be sure to include scr to <img> element.