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
Robbie Guerrero
2,508 PointsThe hash tag symbol, why?
<a href="#vege">
why is the pound symbol used in this line of code?
Is it because of this?
<p> <a id="vege"> Items marked with a (v) are suitable for vegetarians.</a></p>
6 Answers
Scott Evans
4,236 PointsI edited your answer slightly just so the <a> tag was visible.
Pound tags are used within HTML documents as a way of navigating the page automatically.
For example if you had an element at the top of your page with the ID id='top' and at the bottom you had an anchor tag like this <a href='#top'> Go to top</a> when clicked it would automatically cause the browser to move the webpage to the location of the #top element.
"Link to an element with a specified id within the page (like href="#top")" - W3Schools
James Barnett
39,199 PointsAs w3schools has some issues with credibility so as a general rule of thumb I avoid linking to them instead I usually suggest these one of these fine resources:
For instance in this case my old stand by, HTML Dog covers the same material.
Scott Evans
4,236 PointsOh yes, I agree totally. Just with something so simple, where I know what they state is correct I don't see the harm. I'll avoid it from now on anyway, just incase. Thanks
James Barnett
39,199 PointsScott Evans - I make sure to mention it because a surprising number of people new to web design here on the forum aren't aware? that W3Schools is unaffiliated with the W3C and have mentioned that when I've posted about the issues with W3Schools in the past.
So my rule is never give a W3Schools link to a newbie without a caveat about their credibility issues so they have a heads up.
Scott Evans
4,236 PointsSounds good to me, ill keep that in mind. thanks for the advice James Barnett
Joe Hirst
Courses Plus Student 6,489 PointsThe pound sign is typically used in anchors to navigate to another section of the same page.
Robbie Guerrero
2,508 Points<a href="#vege">v</a>
This line of code. what is the significance of the pound symbol?
Robbie Guerrero
2,508 PointsIts not showing the code. It is showing the output of the code....I'll figure it out.
Robbie Guerrero
2,508 PointsThanks Scott and Joseph! I appreciate the quick reply...Just learned something new :)
Scott Evans
4,236 PointsDon't forget to vote a best answer to show other students what answered your question
Scott.
Robbie Guerrero
2,508 PointsGot It!
Scott Evans
4,236 PointsScott Evans
4,236 PointsWhich line of code are you talking about Robbie?