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 How to Make a Website Creating HTML Content Add Image Gallery Content

Kim Gee
Kim Gee
3,841 Points

img tag not working - <a href="img/numbers-01.jpg"> <img src="img/numbers-01.jpg" alt="" > </a>

<!DOCTYPE html>
<html >
    <head>
        <title>Kim Gee | Designer</title>
        <meta charset="utf-8">
        <link rel="stylesheet" href="css/normalize.css">
    </head>
    <body>
        <header>
            <a href="index.html">
                    <h1>Kim Gee</h1>
                    <h2>Designer</h2>
                </a>
            <nav>
            <ul>
                <li><a href="index.html">Portfolio</a></li>
                <li><a href="about.html">About</a></li>
                <li><a href="contact.html">Contact</a></li>
                </ul>
            </nav>
        </header>
        <section>
            <ul>
                <li>
                    <a href="img/numbers-01.jpg">
                    <img src="img/numbers-01.jpg" alt=""   >
                    <p>Experimentation with color and texture</p>
                    </a>
                </li>
                <li>
                    <a href="img/numbers-02.jpg">
                    <img src="img/numbers-02.jpg" alt=""   >
                    <p>Playing with blending modes in Photoshop.</p>
                    </a>
                </li>
                <li>
                    <a href="img/numbers-06.jpg">
                    <img src="img/numbers-06.jpg" alt=""   >
                    <p>Trying to create an 80's style of glows.</p>
                    </a>
                </li>
                <li>
                    <a href="img/numbers-09.jpg">
                    <img src="img/numbers-09.jpg" alt=""   >
                    <p>Drips created using Photoshop brushes.</p>
                    </a>
                </li>
                <li>
                    <a href="img/numbers-12.jpg">
                    <img src="img/numbers-12.jpg" alt=""   >
                    <p>Creating shapes using repetition.</p>
                    </a>
                </li>
            </ul>
        </section>
        <footer>
<a href="https://twitter.com/?gclid=COyQ7LCY5cUCFdAkgQod5rgA1g&gclsrc=aw.ds"><img src="img/twitter-wrap.png" alt="Twitter Logo" ></a>
    <a href="https://www.facebook.com/facebook" ><img src="img/facebook-wrap.png" alt="Facebook Logo" ></a>
            <p>&copy; 2015 Kim Gee.</p>

        </footer>
</body>
</html>

Are the images not showing or are the links not working? and is this for a code challenge or just on your own?

Kim Gee
Kim Gee
3,841 Points

The links are showing up on the page but not working. Also the image is not showing on page. I just started treehouse yesterday and am trying to find my way around. The material is from one of the videos by Nick.

It's totally cool! let figure out what's going on. first did you download the img folder from the teachers notes? and if so are they placed in the img folder?

Kim Gee
Kim Gee
3,841 Points

Yes I downloaded images and uploaded them to the site. I placed each image into an img folder.

the only thing I can think of is for you to tighten up the img tag like so:

HTML
<a href="img/number-12.jpg">
<img src="img/numbers-12.jpg" alt="">
<p>Creating shapes and stuff</p>
</a>

your img tag closers are very far away from the alt tag.

Kim Gee
Kim Gee
3,841 Points

now my CSS is not working and the code is correct also. I have the free couple weeks at treehouse. Because it is free are some of the stuff not turned on for me? If so I want to jump past the free weeks. does anyone know?

Kim Gee
Kim Gee
3,841 Points

thank you Jacob I will try to tighten up my code.

are you using workspaces? and yes, from what I know all the base learning is available during the free trial.

if it doesn't work let us know and we will try and help. if anything try working though the series and go back to this issue later. Sometimes with a break you can spot the problem a lot easier.

Kim Gee
Kim Gee
3,841 Points

Yes I am using workspaces. I checked it in IE and Chrome. It's not working in either.

yeah I can't find the problem. Sorry. I'll try and look at it later today and get back to you. from the HTML it looks fine to me, but there may be a minor error in the syntax I'm missing.

2 Answers

Where are you trying to link to? Right now it looks like you want to click on the image and it takes you to the image. Just to verify your folder structure you have an index.html file in a directory with a folder named "img" with the image in that img folder. correct?

Kim Gee
Kim Gee
3,841 Points

I resolved the issue. IE doesn't like my code but Chrome does! It's all working in chrome.