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 HTML Links Anchors

anchor tags

So, this is the second thing I've done in exactly the same way as it is shown in the video that doesn't work. I used this code:

<a href=“#some_text”>My Link</a>
(lots of line breaks)

<p id=“some_text”>The anchor takes us here.</p>
(lots of line breaks)

When I click on my link, rather than jumping to my paragraph text that contains the some_text id, I get an error that says the page isn't found or the file doesn't exist. I tried it in both Chrome and Safari.

3 Answers

Stone Preston
Stone Preston
42,016 Points

it looks like the browser does not recognize the character you used for the quotation marks, which is why it isnt working. the quotes you used around the href and id look like this: whereas they need to look like this: ". the ones you used are not normal quotation marks (did you paste them in from somewhere? do your quotes always look like that when you type them from your keyboard?) try this:

<a href="#some_text">My Link</a>


<p id="some_text">The anchor takes us here.</p>
Michael Collins
Michael Collins
433 Points

Don't use MS Word to write text documents. They use characters that "look" like something you are familiar with, but are actually something different. In this case, it looks like you are using smart quotes. Browsers don't know what to do with smart quotes. To you they look like quotes, but to the browser they are just nonsense.

You can use a text editor like Notepad, or EditPlus or BBedit or Dreamweaver. There's lots of free HTML editors out there.

The quotes have to be it because the last thing I did that didn't work was an abbreviation tag with a title attribute that used quotes also.

I'm writing in TextEdit on a Mac and have it set to plain text, but just realized the option for smart quotes was automatically checked in the preferences when I started. Unchecked it and I'm now getting straight quotes instead of typographer's quotes. It's the little things. Thanks so much guys! I really appreciate it.