learning-area
learning-area copied to clipboard
Обертка для лейбл+инпут
https://github.com/mdn/learning-area/blob/ce63adeaaa67514291e9da11671d735f99195b2a/html/forms/html-form-structure/payment-form.html#L19
- чаще оберткой над лейбл+инпут делают div или p, списки чаще используют для input type="checkbox" или "radio", что логично, т.к. запрашиваемая в инпутах инфа не всегда однотипна, а в списки помещают однотипную инфу. (Хотя в примерах можно встрерить и списки)
DeepL translation:
More often div or p are used as wrapper over label+input, lists are more often used for input type="checkbox" or "radio", which is logical, because requested info in inputs is not always the same, and lists are used to put the same info. (Although you may see lists in the examples.)
I don't see a problem with using lists to structure forms. You can look at a form as a list of information we request from someone. When looking at the HTML spec (4.4.6 The ul element and 4.4.8 The li element) I can't see anything contradicting this usage.