HTML5 Form tag

Table tags

1, forms a major role
table is mainly used for display, data display, because he can make the data look very neat, very good readability. Especially when the background display data, able to skillfully use the table becomes very important to a refreshing simplicity of form you can put the data multifarious article appeared very
basic syntax 2 form

               <table>                                            //用于定义表格的标签   
                   <tr>                                                //定义表格中的行         
                       <td>单元格内的文字</td>       //定义数据但余个的内容
                   </tr>
               </table>

3, the label header cell
Usually header cell located in the first row or the first column of the table, the meter unit text bold face centered Gerry
(abbreviation table head) of the label marking the header portion of the HTML form

              <table>      
                  <tr>          
                      <th>姓名</th><th>学号</th><th>性别</th><th>成绩</th>      
                  <tr>      
                  <tr>           
                      <td>qijian</td><td>20200312</td><td></td><td>90</td>
                  </tr>
              <table>

4, Table Properties
Table Properties we do not in actual development, followed by css to set
properties:
. 1, align = left values: left, conter, right description: a predetermined form relative to the surrounding elements pile embodiment
2, border 1, or "" a predetermined form whether has a border, default: "", indicating that no frame
3, the pixel values of predetermined blank cellpadding edge between the unit and its contents, the default pixel
4, the gap between the pixel cells cellapacing predetermined value, the default pixel
5, width pixel or percentage of a predetermined width of the table
example:

              <!-- 这些属性要写到表格标签table 里面去 -->    
              <table align="center" border="1" cellpadding="0" cellspacing="0" width="500" height="249">        
                  <tr>
                      <th>姓名</th>  <th>性别</th> <th> 年龄 </th>
                  </tr>        
                  <tr>
                      <td>qijian</td>  <td></td> <td> 20 </td>
                  </tr>        
                  <tr>
                      <td>kerry</td>  <td></td> <td> 19 </td>
                  </tr>        
                  <tr>
                      <td>marry</td>  <td></td> <td> 18 </td>
                  </tr>        
                  <tr>
                      <td>Tom</td>  <td></td> <td> 20 </td>
                  </tr>   
              </table>

5, the table structure of the label
be used: as a table can be long, in order to better represent the semantics of the table, the table may be divided to form the head body and forms two parts.
Head region table: the table is defined for the head. You must have a label inside. Usually the first row
of the table body region: a body definition table for reproduced data of the body
effect:
This table distinguish good structural
These tabs should

The tag

Published 32 original articles · won praise 24 · views 5891

Guess you like

Origin blog.csdn.net/qq_43663493/article/details/104832047