Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> JavaScript

วิธีสร้างเลย์เอาต์หลายคอลัมน์ใน HTML5 ด้วยตาราง


ออกแบบเว็บเพจให้วางเนื้อหาบนหลายหน้า คุณสามารถวางเนื้อหาในคอลัมน์กลาง ใช้คอลัมน์ซ้ายสำหรับเมนู และคอลัมน์ขวาสำหรับโฆษณาหรือสิ่งอื่นๆ

ตัวอย่าง

<!DOCTYPE html>
<html>
  <head>
    <title>Three Column HTML Layout</title>
  </head>
  <body>
    <table width="100%" border="0">
      <tr valign="top">
        <td bgcolor="#aaa" width="20%">
          <b>Main Menu</b><br/>
          HTML<br/>
          PHP<br/>
          PERL...
        </td>
        <td bgcolor="#b5dcb3" height="200" width="60%">
          Technical and Managerial Tutorials
        </td>
        <td bgcolor="#aaa" width="20%">
          <b>Right Menu</b><br/>
          HTML<br/>
          PHP<br/>
          PERL...
        </td>
      </tr>
    </table>
  </body>
</html>