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

CSS

<a href="#"></a>

If i write like this somewhere of the page, for example :

<a href="#">Find out more</a> or <a href="#">Lion's Life</a>

then when i click this it takes me to the top of the page. Why? Please help me ? Thanks beforhand.

2 Answers

Hi Abdullaziz,

is a placeholder that the treehouse staff tend to use in a tags. You could replace the '#' with a link to anywhere you'd like. You could even add a link to a section on the same page. If there is another element on the page, for example:

<div id="section"></div> 

You could link to the above div by adding an anchor tag like so:

<a href="#section">This is a link</a>

Hope this helps, Shaun

Thank you so much bro