Home > Web Front-end > HTML Tutorial > 2.HTML 表格_html/css_WEB-ITnose

2.HTML 表格_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 11:33:26
Original
1135 people have browsed it

1.表格代码:

<table></table> // 定义表格<tr></tr>   //定义行<td></td> //定义列<th></th> // 定义标题
Copy after login

数据单元格可以包含文本、图片、列表、段落、表单、水平线、表格等等。

2.如果不定义边框属性,表格将不显示边框。有时这很有用,但是大多数时候,我们希望显示边框:

<table border="1"></table>
Copy after login

3.表格表头,通常会显示为黑体居中的效果:

<th></th>
Copy after login

4.表格标题:

<table><caption>Welcome</caption></table>
Copy after login

5.表格的跨行和跨列:

<tr colspan="2"></tr>  //跨两行<td rowspan="2"></td> // 跨两列
Copy after login

6.表格单元格内距:

<table cellspadding="0"></table>
Copy after login

7.表格单元格边距:

<table cellspacing="0"></table>
Copy after login

 

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template