p vs. ol or ul for form styling

前端 未结 7 1815
醉梦人生
醉梦人生 2021-02-01 07:16

Typically I style forms with the unordered list tag e.g.

7条回答
  •  遥遥无期
    2021-02-01 07:45

    In my opinion a group of form controls is neither a list item or a paragraph. When I mark up forms, I separate my groups of label/input by wrapping them in

    s. If you're trying to mark up a division between form controls, then don't be afraid of using a
    .

    From your given examples,

    probably degrades "better" because you won't see bullets next to your items if CSS was unavailable, and the groups of controls would probably be spaced out fairly well.

提交回复
热议问题