Is it bad design to use table tags when displaying forms in html?

前端 未结 12 1679
长情又很酷
长情又很酷 2020-11-30 05:01

I keep hearing that div tags should be used for layout purposes and not table tags. So does that also apply to form layout? I know a form layout is

12条回答
  •  孤城傲影
    2020-11-30 05:24

    Yes, it does apply for form layouts. Keep in mind that there are also tags like FIELDSET and LABEL which exist specifically for adding structure to a form, so it's not really a question of just using DIV. You should be able to markup a form with pretty minimal HTML, and let CSS do the rest of the work. E.g.:

    ...

提交回复
热议问题