设计网页时经常会用到表格来组织页面信息,它能将网页划分成任意多个矩形区域,每个区域可包含导航、文字、图像、动画等信息,设计者可将任意的网页元素放入其中。
1. 表格的定义:
1)在需要使用表格的地方插入成对的
标签 | 说明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
实例: <html><head> <title>表格的定义</title></head><body> <table border="1"> <caption>计算机学习</caption> <tr> <th>CS</th> <th>数据库</th> <th>BS</th> </tr> <tr> <td>软件工程</td> <td>SQL Server</td> <td>html</td> </tr> <tr> <td>设计模式</td> <td>mySql</td> <td>JavaScript</td> </tr> </table></body></html> Copier après la connexion 效果: 2)划分结构表格 划分结构表格是指将一个表格分成三个部分,分别使用三个标记
2. 表格属性 在网页的设计中常常需要对网页中的表格
实例: <html><head> <title>表格的属性</title></head><body> <table width="500" frame="hsides" rules="rows"> <caption>计算机学习</caption> <tr> <th>CS</th> <th>数据库</th> <th>BS</th> </tr> <tr> <td>设计模式</td> <td>mySql</td> <td>JavaScript</td> </tr> <tr> <td>软件工程</td> <td>SQL Server</td> <td>html</td> </tr> </table></body></html> Copier après la connexion 效果: 3.表格行与单元格的属性 在表格中,通过 的属性设置表格单元格的属性。 |
实例: <html><head> <title>表格行与单元格的属性</title></head><body> <table width="500" frame="hsides" rules="all"> <caption>计算机学习</caption> <tr> <th>CS</th> <th>数据库</th> <th>BS</th> </tr> <tr> <td rowspan="2" align="center">设计模式</td> <td >mySql</td> <td>JavaScript</td> </tr> <tr> <td>SQL Server</td> <td>html</td> </tr> </table></body></html> Copier après la connexion 效果:
4.多个表格的使用 表格可以嵌套使用以表示层次关系,在
小结: 表格是一种很简单的页面布局工具,它的应用使得网页简洁直观,且更便于阅读。熟练掌握主要的表格标记的相关属性,可以提高工作效率
Étiquettes associées:
Article précédent:CSS打造的边框折角效果_html/css_WEB-ITnose
Article suivant:UIWindow不使用代理如何实现根控制器的跳转(页面跳转的实现)_html/css_WEB-ITnose
Déclaration de ce site Web
Le contenu de cet article est volontairement contribué par les internautes et les droits d'auteur appartiennent à l'auteur original. Ce site n'assume aucune responsabilité légale correspondante. Si vous trouvez un contenu suspecté de plagiat ou de contrefaçon, veuillez contacter admin@php.cn
Derniers articles par auteur
Derniers numéros
javascript - Le code pour modifier l'image de la boîte dans la liste déroulante.
Depuis 1970-01-01 08:00:00
0
0
0
Comment ionic2 utilise-t-il les styles d'iOS sur la plateforme Android
Depuis 1970-01-01 08:00:00
0
0
0
javascript - Existe-t-il un excellent outil de point d'arrêt sur NPM?
Depuis 1970-01-01 08:00:00
0
0
0
javascript - Comment Webpack bloque-t-il globalement la valeur de hachage de cette build pour une utilisation par le code JS ?
Depuis 1970-01-01 08:00:00
0
0
0
javascript - Comment jQuery implémente-t-il le préchargement des effets sonores sur les pages mobiles?
Depuis 1970-01-01 08:00:00
0
0
0
Rubriques connexes
Plus>
|