Hello! I am not sure if this is the correct place to ask this, but I am on step 56 of the cat app tutorial and it took me many tries to get right. I seem to have gotten the code correct now but I am unsure of what I actually am doing with that code.
It says that it’s another way to associate an input element’s text with the element itself, but looking through my notes I can’t seem to find the first way.
Also, what are the benefits of one way vs. the other?
Also also, what exactly is the purpose of associating the input of an element’s text with the element itself?
if you click on a label beside an input and the input gets “triggered” (you can type into it even if you haven’t directly clicked on the input yet) then that means that label is connected to that input.
Feel free to ask any more questions you might have.
I found the wording and expectation for this step a bit awkward, e.g., if a label is preferred here, though it doesn’t really simplify anything in this context, it would seem more practical to nest the input within it, and even less evident if not nested to place the label adjacent to and following its input. This was the first step in this entire set that tripped me up. Thanks for this explanation.