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 trialVictor Ibasco
11,035 PointsHTML - Radio Button - Label Proceeds Input - Why
Hi ! I'm going through the HTML Forms Course and I am wondering why the LABEL element proceeds the Input RATHER than precedes.
You see, before this I have seen that the label elements have typically preceded the input as it . . . does any of this matter?
I want to know best practices and any extra information from blogs or just your opinion.
Thanks !
Cheers, Victor
1 Answer
Steven Parker
231,269 PointsBecause there is a creative aspect to form layout, I'm not sure this is a "best practice" issue.
But I think it's common for labels to precede a control unless that control is a checkbox or radio button. This will give the form a familiar look, but other choices might be made for creative purposes.
Victor Ibasco
11,035 PointsVictor Ibasco
11,035 PointsI am so sorry, let me add to this. The video was playing while I was writing and I had struggled to stay focused on the question ( bug w/ the video that would keep playing when I clicked to ask a question )
I want to add that creating radio or checkbox element the instructor had written the labels PROCEEDING the radio / checkbox inputs.
Before, it was always the labels PRECEDING the inputs of text / email / pass and so fourth. I wanted clarification on why. Hope this helps, thanks so much and sorry for my mistake !