Why is the Bootstrap grid layout preferable to an HTML table?

后端 未结 9 803
生来不讨喜
生来不讨喜 2021-01-31 01:30

[Note: for those who may be confusing this question with \"why not use tables for HTML layout\", I am not asking that question. The question I\'m asking is why is a grid layout

9条回答
  •  离开以前
    2021-01-31 02:20

    I believe that CBroe comment is the best option, so I chose to clarify it.

    Avoid div's. A div should be your last resort, not your first option. Instead, try to use Bootstrap classes on the actual elements. For instance:

    It is a shame to use fieldset to contain a single field, but it is semantically best than using a div for the same thing. The HTML5 standard defines many new container elements, such as article, section, header, footer and many more. In some cases you will have to use div's, but if you minimize it's use then your code will be way more semantic.

提交回复
热议问题