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

前端 未结 12 1662
长情又很酷
长情又很酷 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:39

    One thing that I don't often see discussed in these form layout questions, if you've chosen a table to layout your form (with labels on the left and fields on the right as mentioned in one of the answers) then that layout is fixed. At work we recently had to do a quick 'proof of concept' of our web apps in Arabic. The apps which had used tables for form layout were basically stuck, whereas I was able to reverse the order of all the form fields and labels on all my pages by changing about ten lines in my CSS file.

提交回复
热议问题