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
Izzatilla Karimov
9,284 PointsLinks
How do I make the link go to another page....I did put the (a tag) but it won't go any where...
5 Answers
Tom Mertz
15,254 PointsHi,
you need to add the href attribute
If you want to go to a webpage, say google, you'd add
<a href="http://www.google.com">This is the text that will be underlined in blue</a> (Note the http:// is needed here!)
if you want to go to a page that is in the same directory as your index.html file you would do
<a href="contacts.html">This would open your contacts HTML file</a>
Also, if you want to go to an HTML element with an id (like the one below) you'd do this.
<div id="elementToGoTo">When you push the link this element will be the top of the screen</div>
<a href="#elementToGoTo">Push this blue text will take you to the div above!</a>
Tom Mertz
15,254 PointsYou would just make another html file (about.html) and save it right next to your index.html (or the name of your current html file) and then you'd put all the things you want on your about page in the about.html file. And now when your link looks at the href="about.html" it will see your about file and go right to it.
Normally, I would copy my index.html file and rename it to about.html then just make some modifications to it, instead of having to retype an entirely new page.
Izzatilla Karimov
9,284 PointsI created About link...I want to design the about page myself, how do I do that?
Izzatilla Karimov
9,284 PointsOk, Thanks... When Im designing it do I have to put Doctype html on top?
Tom Mertz
15,254 PointsYup, you should include it in any webpage you have, as well as html, head, and body tags. Good luck :)
Izzatilla Karimov
9,284 PointsThank that really helped