新程序 发表于 2025-6-11 00:14:35

04html教程:表格table创建


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="widtd=device-widtd, initial-scale=1.0">
    <title>04表格table创建</title>

    <!--
    <table></table> 是表格标签
    <tr></tr>表格的行
    <th></th> 表格的表格,加粗
    <td></td> 表格单元
   
    标签属性
    <table border="1">border 为边框属性,1代表有边框,代表宽度,单位为像素
    <table border="1" align="center">align="center" 为水平对齐属性 居中, 左(left)/右(right)/中 (center)
    <tr height="100" valign="bottom">height="100" 影响当前单元行的高度,
    <td height="100" valign="bottom">height="100" 影响当前单元列的高度
    <table border="1" width="500">width="500" 影响当前表格内容的宽度


    <tr height="100" valign="bottom">valign="bottom"为当前内容的垂直对齐方式, top上对齐,bottom下对齐,middle居中



    css语法
    <style><style>
    solid blue; 值,颜色
   
    -->

    <style>
      table,tr,th,td{
      border: 9px solid blue;
       }

    </style>

</head>
<body>

<h1>表格table创建</h1>
    <table border="1" align="left" width="500">
      <tr>
          <th>广东省</th>
          <th>广西省</th>
          <th>江西省</th>
          <th>湖南省</th>
      </tr>
      <tr>
          <td>广州市</td>
          <td>南宁市</td>
          <td>南昌市</td>
          <td>长沙市</td>
      </tr>
      <tr>
          <td>深圳市</td>
          <td>桂林市</td>
          <td>赣州市</td>
          <td>永州市</td>

      </tr>

    </table>
   
</body>
</html>





文件下载
**** Hidden Message *****


<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="widtd=device-widtd, initial-scale=1.0">
    <title>04表格table创建</title>

    <!--
    <table></table> 是表格标签
    <tr></tr>表格的行
    <th></th> 表格的表格,加粗
    <td></td> 表格单元
   
    标签属性
    <table border="1">border 为边框属性,1代表有边框,代表宽度,单位为像素
    <table border="1" align="center">align="center" 为水平对齐属性 居中, 左(left)/右(right)/中 (center)
    <tr height="100" valign="bottom">height="100" 影响当前单元行的高度,
    <td height="100" valign="bottom">height="100" 影响当前单元列的高度
    <table border="1" width="500">width="500" 影响当前表格内容的宽度


    <tr height="100" valign="bottom">valign="bottom"为当前内容的垂直对齐方式, top上对齐,bottom下对齐,middle居中



    css语法
    <style><style>
    solid blue; 值,颜色
   
    -->

    <style>
      table,tr,th,td{
      border: 9px solid blue;
       }

    </style>

</head>
<body>

<h1>表格table创建</h1>
    <table border="1" align="left" width="500">
      <tr>
          <th>广东省</th>
          <th>广西省</th>
          <th>江西省</th>
          <th>湖南省</th>
      </tr>
      <tr>
          <td>广州市</td>
          <td>南宁市</td>
          <td>南昌市</td>
          <td>长沙市</td>
      </tr>
      <tr>
          <td>深圳市</td>
          <td>桂林市</td>
          <td>赣州市</td>
          <td>永州市</td>

      </tr>

    </table>
   
</body>
</html>

页: [1]
查看完整版本: 04html教程:表格table创建