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 trialThomas Joseph Meneses
9,838 PointsThe Hidden Gem That Is <button>
The introduction of the <button> element was perhaps the most understated reveal I have yet experienced watching the many videos in Treehouse. During the entire HTML Deep Dive I had never even recalled a mention of it, let alone a comparison of it vs. the <input type="submit"> element. This is to my knowledge the first and only time the <button> element was revealed to he viewing membership.
After a brief research coughgooglecough, this element deserves far, far more screen time. It's not even one of the newer elements like the semantic <section> et al. tags, and yet it provides a general-purpose and entirely semantic way of having style-able buttons to our code. Just think of all the <span>s we don' have to write anymore!
<button> has no disadvantages functionally over the corresponding <input> button, and has the absolutely huge advantage of not needing to submit a form to a server. Not only that, you can put literally anything in between the opening and closing tags, allowing the use of images, videos, and any future HTML media. That blows my mind.
The only reason it didn't reach the ubiquitous popularity it deserves seemed to be due to IE6 having problems rendering it, but in a world where HTML5 standards are becoming increasingly mainstream, I think it's high time for the <button> element to take its rightful place among the most common semantic tags e.g. <p>, <a>, <img>.
TL;DR: Treehouse, give us a <button> badge in HTML Deep Dive!
1 Answer
Riley Hilliard
Courses Plus Student 17,771 PointsI have never seen someone so pumped on the button element. You are awesome, haha.