在網絡上,隨處都可以看到像報紙那樣的格式化分欄。
HTML 布局
HTML布局 - 使用表格
One very common practice with HTML, is to use HTML tables to format the layout of an HTML page. A part of this page is formatted with two columns, like a newspaper page. As you can see on this page, there is a left column and a right column. This text is displayed in the left column. | An HTML <table> is used to divide a part of this Web page into two columns. The trick is to use a table without borders, and maybe a little extra cell-padding. No matter how much text you add to this page, it will stay inside its column borders. |
同樣的布局 - 添加了顏色
One very common practice with HTML, is to use HTML tables to format the layout of an HTML page. A part of this page is formatted with two columns, like a newspaper page. As you can see at this page, there is a left column and a right column. | An HTML <table> is used to divide a part of this Web page into two columns. This text is displayed in the right column. The trick is to use a table without borders, and maybe a little extra cell-padding. No matter how much text you add to this page, it will stay inside its column borders. |
實例
將HTML頁面的一部分分割為表格的列是很容易的。為了您可以親自嘗試它,我們為您準備了這個簡單的例子。