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 trialdirkstokkel
6,042 Pointslink vs button
why use a link and not a button?
UPDATE: I have to clarify something. I assumed that when I ask a question at a certain point in a course, this point is visible for everyone. If not, than I have to describe the context and that's a little much to ask so forget my question. Thanks for your time to try and answer my question.
2 Answers
Daniel Devereux
3,190 PointsHi Dirk Stokkel,
I'm not exactly sure what context you're asking this question in, but to clarify: Links are great for navigation on the menu bar as well as throughout written content. For instance, if you wanted to link to an outside source such as wikipedia when you're describing something in your <p> tags, links would be the way to go. Contrarily, Buttons, are more appropriate for creating call-to-action events such as signing up for a membership or asking a user to "learn more".
Hope this helps.
Sean Ahern
7,533 PointsHey Dirk,
Links are generally reserved for navigation.
Button controls are used for forms and actions that involve submissions or requests.
Sometimes navigation links are styled like a button to nudge the user towards a particular next step, like Daniel said. This is ok, but should be avoided in an application.
Brian Douglas
7,933 PointsBrian Douglas
7,933 PointsCan you be more specific? The
{{link-to}}
helper does the work creating a HTML link. That can easily be wrap with a button.