溫瑞烘老師的教學歷程檔案(Teaching ePortfolio) - 104-2-四技資管二甲-資料結構 - 第4週-資料結構第1章
 

資訊管理系
副教授
温瑞烘


歷程檔案 Portfolio


關於我 About Me

第4週-資料結構第1章

HTML架構與TABLE

<HTML>     <!-- HTML開始 -->
   <HEAD>  <!-- HEAD(頭部)開始 -->
      <TITLE>我的第一個HTML程式</TITLE> <!-- 標題 -->
   </HEAD> <!-- HEAD(頭部)結束 -->
   <BODY>  <!-- BODY(身體)開始 -->
      <P>Hello world!
   </BODY>  <!-- BODY(身體)結束 -->
</HTML> <!-- HTML結束 -->

 

// 改成PHP
<?php
    echo "<HTML>";    //  HTML開始 
    echo "<HEAD>"     // HEAD(頭部)開始 
    echo "<TITLE>我的第一個HTML程式</TITLE>"; 
    echo "</HEAD>";  // HEAD(頭部)結束
    echo "<BODY>";   // BODY(身體)開始
    echo "<P>Hello world!"; 
    echo "</BODY>"   //  BODY(身體)結束
    echo "</HTML>";   //  HTML結束
?>

HTML TABLE 語法

<table ...>  ....  </table> 

SUMMARY=Text (purpose/structure of table)
  • WIDTH=Length (table width)
  • BORDER=Pixels (border width)
  • FRAME=[ void | above | below | hsides | lhs | rhs | vsides | box | border ] (outer border)
  • RULES=[ none | groups | rows | cols | all ] (inner borders)
  • CELLSPACING=Length (spacing between cells)
  • CELLPADDING=Length (spacing within cells)
  • ALIGN=[ left | center | right ] (table alignment)
  • BGCOLOR=Color (table background color)


<!-- HTML版 範例-->
<html>
<body>
<center>
<table border=1 cellpadding=1 cellspacing=1>
<!-- border=邊界 border=0 無邊界  -->
<!-- cellpadding 儲存格邊界             -->
<!-- cellspacing 儲存格間距             -->
<caption>公佈欄</caption>
<tr>
  <td>第一列第一行</td>
  <td>第一列第二行</td>
</tr>
<tr>
  <td>第二列第一行</td>
  <td>第二列第二行</td>
</tr>
</center>
</table>  
</body>
</html>


// PHP版
<?php
  echo "<html>";
  echo "<body><center>";
  echo "<table border=1 cellpadding=1 cellspacing=1>
            <caption>公佈欄</caption>";
  echo "<tr> <td>第一列第一行</td>";
  echo "<td>第一列第二行</td>";
  echo "</tr>";
  echo "<tr><td>第二列第一行</td>";
  echo "<td>第二列第二行</td>";
  echo "</tr>";
  echo "</table>";
  echo "</center></body>";
  echo "</html>";
?>

作業 8: 將上週的九九乘法表加上 Table
 

 

 九九乘法

1

2

3

4

5

6

7

8

9

1

1*1=1

1*2=2

 

 

 

 

 

 

1*9=9

2

 

 

 

 

 

 

 

 

 

3

 

 

 

 

 

 

 

 

 

4

 

 

 

 

 

 

 

 

 

5

 

 

 

 

 

 

 

 

 

6

 

 

 

 

 

 

 

 

 

7

 

 

 

 

 

 

 

 

 

8

 

 

 

 

 

 

 

 

 

9

9*1=9

9*2=18

 

 

 

 

 

 

9*9=81

 

 

 


 

 
全部共 0則留言
登入帳號密碼代表遵守學術網路規範
 


文章分類 Labels

 


最新文章 Top10

中華科技大學數位化學習歷程 - 意見反應