Design comparison
Solution retrospective
Which tag is the best option for the interactive elements, button or input (and which type for input)?
Community feedback
- @12KentosPosted over 2 years ago
Hey @min4899
Good job on completing the challenge, looks great!
As for your question, it really depends on the situation, and what you are used to. There isn't a "you should always use this" that I know of. The course I took to learn html/css the teacher liked to make buttons out of
<a>
tags instead of<button>
unless the button was used on a form. That way it has a built in link so when you click the button it will take you to linked page. But it's perfectly fine to use the<button>
tag instead of the<a>
tag, so some of it just comes down to personal preference.Here's the mdn documentation on html elements.
If you do a page search for "input" the third option should take you to the list of all of the input types. You can then click on the one you want to learn more about, and it will take you to the full documentation on that element. This is the best place to learn what elements are generally used in which situations.
Hope that helps!
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord