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

Jim McQuarrie
Jim McQuarrie
10,597 Points

Special character must be escaped

I am using brackets and had a pink box stating there was an error. I copied the code into dreamweaver as I couldnt find the problem and dreamweaver gave me this "special character must be escaped" here is the code

<a href="img/Accolade1a.JPG">
 <img src="img/Accolade1a.JPG" alt"">
 <p>Accolade1a Template</p>
</a>

I have this code placed several times with different images for each one, pretty basic code.

Any ideas?

Jim

Lukas Smith
Lukas Smith
4,026 Points

i have no idea what special char :D but anyway you should change JPG on jpg

Jim McQuarrie
Jim McQuarrie
10,597 Points

Thanks, I changed to lower case. That of course is not the problem but it makes for could semantics :)

5 Answers

the error is your alt, it should be alt = "something"

Jim McQuarrie
Jim McQuarrie
10,597 Points

Wow, I can not believe I did that and even missed it, I have been going for 10 to 12 hours a day to finish up the Front End developer track and just finished yesterday and started my project. Can you say "Brain Fart"

I would slap myself :) but that would hurt :) JK

I agree - you're missing an equals sign between the alt and the empty string's double quotes.

Should be:

<a href="img/Accolade1a.JPG">
 <img src="img/Accolade1a.JPG" alt="">
 <p>Accolade1a Template</p>
</a>

Hope that helps.

Steve.

Jim McQuarrie
Jim McQuarrie
10,597 Points

Thank you Steve, same comments that I gave Tom apply :)

:-)

Dont slap yourself for forgetting the =, we all do that time and again. Instead slap yourself for not filling out the alt tag fully with a meaningful alt to help with accessibility :P

Jim McQuarrie
Jim McQuarrie
10,597 Points

well... actually that was done on purpose as the images are placeholders only for now while I mock up the site.

;)