如何在不使用表的情况下垂直划分网页?

Jan*_*cci 5 html tabular

我在某处读过(事实上是在Stack Overflow上!)使用表格在html中布局页面是个坏主意.

我有一个HTML页面,需要在中间"划分",左边有一些内容,右边有一些内容.首先,我会想到使用嵌套表,每个宽度为50%.我可以用div做同样的事情吗?还是其他一些html构造?

Akh*_*hil 9

<div style="float:left; width:50%;">
Left  <!-- Set Div As your requirement -->
</div>
<div style="float:left; width:50%;">
Right  <!-- Set Div As your requirement -->
</div>
Run Code Online (Sandbox Code Playgroud)