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

General Discussion

Does anyone know how to make links in Codepen?

Hey there, I'm trying to practice how to make html links on Codepen, but I have no idea what they're talking about. I know that if someone puts…<a href="target_page.html" click here to go to target page</a, that it will go there, and I know that a page called target_page.html needs to exist for the link to go there. I've tried to make a new Pen in Codepen and make a new html page called target_page.html and link the pages, but the link only works the first time, and then it takes me back to the html code.I just don't know how to get started, to make multiple pages that link and have a place to test them. If anyone could me I'd really appreciate that. Thanks.

4 Answers

Alan Johnson
Alan Johnson
7,625 Points

Hi Robin! Codepen doesn't let you create extra files within each Pen, so you won't really be able to add a new page (like target_page.html) that you mentioned. I'd definitely recommend playing with linking in Workspaces, though - you can add as many pages as you'd like and link between them there.

Thank you Alan. I really appreciate your comments and I'll definitely check out Workspaces. Take care.

James Barnett
James Barnett
39,199 Points

Codepen works great for many things but understanding links in basic HTML is not one of them as Codepen doesn't have a concept of multiple pages.

Workspaces does (as Alan has already mentioned) the only other service I know of that's easy to get started and allows you to add pages is cloud9.

Just for an update that was provided from someone on this, if you use TARGET="BLANK' the page should load.