標籤:
表格的基本構成:table,tr,td,表格是有行,列,儲存格組成; 1:表格的基本屬性工作表頭(th)文法:<th>左邊</th>寬度(width)高度(height)表格的對齊:align屬性:center:置中;right:靠右對齊;left:靠左對齊邊框:border邊框顏色:bordercolor內框寬度:cellspacing表格內的文字與邊框之間的距離:cellpadding表格的背景:bgcolor表格背景映像:background文法:<table border="1px" width="1800px" height="50px" align="center" bordercolor="red" cellspacing="0px"cellpadding="0px" bgcolor="#7fff00" background="img/1.jpg" > 2:表格的行屬性高度:width邊框顏色:bordercolor行背景:bgcolor,background行文字的水平對齊:align行文字的垂直對齊:valign; 屬性:top,middlle,bottom 3:儲存格屬性:儲存格的大小:width,height水平跨度:colspan垂直跨度:rowspan對齊:align,valign;屬性:top,middlle,bottom背景顏色:bgcolor儲存格邊框顏色:bordercolor儲存格亮邊框顏色:bordercolorlight儲存格暗邊框顏色:bordercolordark儲存格的背景映像:background 綜合執行個體: 需求:
<table width="1800px" border="1px" bordercolor="red" cellpadding="0px" cellspacing="0px" align="center"> <tr> <td> <table border="1px" width="1800px" cellspacing="0px"> <tr height="50px"> <td width="600px" align="left"> <img src="img/logo2.png" alt="logo"/> </td> <td width="600px" align="center"> <img src="img/header.png"/> </td> <td width="600px" align="center"> <a href="#"><font size="10">登入</font></a> <a href="#"><font size="5">註冊</font></a> <a href="#"><font size="5">購物車</font></a> </td> </tr> </table> </td> </tr> <tr height="50px" bgcolor="black"> <td> <a href="#"><font size="8" color="white">首頁</font></a> <a href="#"><font size="5" color="white">手機數位</font></a> <a href="#"><font size="5" color="white">電腦辦公</font></a> <a href="#"><font size="5" color="white">家用電器</font></a> </td> </tr></table>
day01_05(html表格介紹)