表格可以使用表格吗?还是使用 div 更正确? [英] Is it acceptable to use tables for forms? Or is it still more correct to use divs?

查看:17
本文介绍了表格可以使用表格吗?还是使用 div 更正确?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以将 table 用于表单.

I'm wondering whether it's acceptable to use tables for forms.

严格来说,名称/值对是表格数据,不是吗?表单只是一组用户可自定义的名称/值对.那么在这种情况下使用 table 是否正确?或者我应该使用带有 CSS 样式的 div 吗?

Strictly speaking, name/value pairs are tabular data, aren't they? And a form is just a user customisable set of name/value pairs. So is it right to use tables in this case? Or should I use divs styled with CSS?

推荐答案

两者都正确.

我更喜欢使用一些 div/li,因为这允许我制作一些不同的布局,但是 tables 用于 forms 并不令人讨厌.

I preffer using some div/li, as that allows me to make some different layouts, but tables for forms are not frowned upon.

实际上,Django 默认为您提供表格格式.

Actually, by default, Django gives you table formated forms.

这篇关于表格可以使用表格吗?还是使用 div 更正确?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆