As the three first inputs show, I have my text to the left with a bit of a margin to the input.
My last input will have some text and display a textarea underneath it.
It’s pretty simple. Would I just use a <span> to wrap my text or what would u suggest?
Hmm that’s weird, I didnt get any notice about activity in this thread, oh well. Thanks a lot for the answers
I just got a question in regards of using the “for” / “id” controller.
I just want to make sure im understanding the usage correct…
The only usage and reason why I have id=“firstname” is because of the connection to the label?? I really dont use the id for anything else, right?
MY input would like this: <input type=“text” name=“name” id=“labelname” class=“inputNormal” /> - so im styling everything in my inputNormal. I’m not sure why, but my first thought was, - that “id” is just extra unnecessary mark-up - but I can see that the label controller won’t work without the id - so guess it’s pretty essentiel
Yes, it links the input to the label. As for using it for anything else, I don’t see why not, though I’m not 100% sure about that. I would think that an id is an id like any other.
Linking the label and the input has lots of advantages, such as providing a clear relationship to people browsing with assistive devices, and for those who find it hard to click on small targets. (Click anywhere beside the label and the input will be highlighted.)