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
nicholas maddren
12,793 PointsWhy won't this HTML display properly?
Hello I am working on a project of mine after watching the HTML foundation I am using this code to display an image yet it wont display in my test HTML page:
<src img="/wp-content/uploads/2014/05/tyre-block.png" alt="Tyres">
That is the code and the file path is http://www.thornabytyres.com//wp-content/uploads/2014/05/tyre-block.png on my server so why wont it display? Any help would be great thanks!
3 Answers
Andrew Kelly
4,738 PointsHi Nicholas,
It looks like you're image formatting is off. I used Safari editor and saw the code as:
<src img="/wp-content/uploads/2014/05/tyre-block.png" alt="Tyre's"></src>
Instead you just need to switch the src and img tags around and you should be good. Like this:
<img src="/wp-content/uploads/2014/05/tyre-block.png" alt="Tyre's">
As I am sure you noticed, you also don't need to close the image tag. They're self closing.
Hope this helps.
nicholas maddren
12,793 PointsThanks! I have noticed that the framework is adding code that shouldn't be added.
Andrew Kelly
4,738 PointsNo problem. Wordpress can be a pain in the ass to learn HTML in.
I'm not sure where you're at with regards to your development, but I'd recommend starting out with standard html and css. and then integrating into Wordpress once you've got a shell ready to go.
Like I said though, I don't know where you are at your development so you may already be doing it. I just know I find it much easier that way. Less variables to work through as you're building.