Home >Web Front-end >HTML Tutorial >Miaowei Cloud Classroom css: tables and forms_html/css_WEB-ITnose

Miaowei Cloud Classroom css: tables and forms_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:06:28830browse

1. Basic characteristics of table

The basic characteristics of table tag are: display:table;

1. Do not give tables other than table, th, td Add style to the label;
2. The cells bisect the width of the table by default;
3. The content in th is bold by default and displayed left, right, top, and bottom in the center;
4. The content in td is displayed in the top, bottom, center, left, and left by default ;
5. table determines the width of the entire table;
6. The cell width in the table will be converted into a percentage;
7. Each column in the table must have a width;
8. The same vertical column of the table inherits the maximum width;
9. The same vertical column of the table inherits the maximum height;

<!DOCTYPE HTML><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>无标题文档</title><style>th,td{padding:0;}table{border-collapse:collapse;}th,td{border:1px solid black; height:50px; width:100px;}table{width:500px;}</style></head><body><table><!-- 表格 -->	<tbody>  	<tr><!-- 行 -->    	<th>表格标题</th>      <th>表格标题</th>      <th>表格标题</th>      <th>表格标题</th>      <th>表格标题</th>    </tr>  	<tr>    	<td>单元格</td>      <td>单元格</td>      <td>单元格</td>      <td>单元格</td>      <td>单元格</td>    </tr>  </tbody></table></body></html>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn