表格标签<table>

<table>的属性:

Align: left, center, right          (表格的)位置

Border:                                   边框

Width:
Height:

Cellspacing                             格子与格子之间边线的距离

cellpadding                             单元格内文字与边框的距离

不重要:(bgcolor   背景颜色  bodercolor 边框颜色)

一、定义标题<caption>

Align、Valign

放在tr标签之前,放在table的内部使用。

随表格位置移动而移动。

二、字段标签 <th>

和<td>的用法一致,文字是以粗体居中显示(唯一区别)。

三、行标签<tr>

属性:Align、Valign、bgcolor

四、列标签<td><th>

属性:Width、 Height、  Align: (left, center, righ)、  Valign:(top, middle, bottom)、Colspan、rowspan

示例:

 <html>
<head><title>表格的应用</title></head>
<body>
<center><h1>我的表格</h1></center>
<table border=1 width="800" align="center" cellspacing="0" cellpadding="0" bgcolor="#cccccc" bordercolor="red" bordercolorlight="green" bordercolordark="yellow">
<caption><h1>我的表格</h1></caption>
<tr>
<th>编号</th>
<th>姓名</th>
<th>年龄</th>
<th>电子邮件</th>
<th>性别</th>
</tr>
<tr>
<td width=50 height=40>1</td>
<td>zhangsan</td>
<td>30</td>
<td>as@lamp.com</td>
<td>男</td>
</tr>
<tr align="center" bgcolor="green" valign="bottom" height="80">
<td>1</td>
<td>zhangsan</td>
<td>30</td>
<td>as@lamp.com</td>
<td>男</td>
</tr>
<tr>
<td>1</td>
<td>zhangsan</td>
<td>30</td>
<td>as@lamp.com</td>
<td>男</td>
</tr>
<tr>
<td>1</td>
<td colspan="3" rowspan=3>zhangsan</td>
<td>男</td>
</tr>
<tr>
<td>1</td> <td>男</td>
</tr> <tr>
<td>1</td> <td>男</td>
</tr> <tr>
<td>1</td>
<td>zhangsan</td>
<td>30</td>
<td>as@lamp.com</td>
<td>男</td>
</tr>
</table>
</body>
</html>

PHP入门 - - 06-->HTML的表格标签的更多相关文章

  1. Bootstrap入门(四)表格

    Bootstrap入门(四)表格 <table>标签 首先,引入bootstrap的css文件,然后表格内容放在一个class为table的<table>标签中(class=& ...

  2. [19/05/16-星期四] HTML_body标签(表格标签)

    一.概念 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <titl ...

  3. Bootstrap入门(2)表格

    Bootstrap入门(四)表格 <table>标签 首先,引入bootstrap的css文件,然后表格内容放在一个class为table的<table>标签中(class=& ...

  4. HTML的表格标签,列表标签,表单标签,HTML5有哪些新特性

    欢迎大家去博客冰山一树Sankey,浏览效果更好.直接右上角搜索该标题即可 博客园主页:博客园主页-冰山一树Sankey CSDN主页:CSDN主页-冰山一树Sankey 前端学习:学习地址:黑马程序 ...

  5. H5 表格标签的其它标签

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  6. H5 表格标签基本使用

    <!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...

  7. HTML常用标签与表格标签

    超链接标签: <a href="超链接地址" target="_blank">超链接的文字</a> _blank或new是在新网页中打开 ...

  8. 9月6日表格标签(table、行、列、表头)(补)

    一.<table> <table>代表表格标签.   <table></table> 1.width  表示表格宽度,宽度表达方式有像素和百分比两种.网 ...

  9. 透明、圆角、阴影效果、背景色渐变、<a></a>去外层虚线、!!!表格标签<table>

    表格标签 <table> 代表表格 width:指表格的宽度           一种是像素 (浏览器缩小的时候出现滚动条)           一种是百分比(跟着浏览器的大小而大小) b ...

随机推荐

  1. java获取本月或某月的第一天和最后一天

    获取某月的第一天和最后一天的日期 Calendar calendar = Calendar.getInstance(); calendar.setTime(date); calendar.set(Ca ...

  2. C Primer Plus_第二章_C语言概述_复习题与编程练习

    REVIEW 1.如何称呼C程序的基本模块? ans 它们被称为函数 2.什么是语法错误?给出一个英语例子和一个C语言例子 me C的语法错误是指把正确的C符号放在了错误的位置 likes codin ...

  3. codeforces 507B. Painting Pebbles 解题报告

    题目链接:http://codeforces.com/problemset/problem/509/B 题目意思:有 n 个piles,第 i 个 piles有 ai 个pebbles,用 k 种颜色 ...

  4. Odoo误删除服务产品造成的错误解决办法

    在Odoo8.0中删除了产品中的服务,会造成工时单模块的安装失败,信息如下所示: ParseError: "null value in column "name" vio ...

  5. 根据OSG中的ref_ptr和Reference简化的智能指针

    main.cpp测试代码 #include "TestSmartPointer" void fun() { SP<TestSmartPointer> sp1=new T ...

  6. ios wax热更新之安装wax(xcode7.3.1)

    通过Finder浏览到你保存该项目的文件夹.创建三个新的文件夹:wax.scripts和Classes. 第一:首先,下载源代码的压缩包.Wax放在GitHub上(https://github.com ...

  7. August 25th 2016 Week 35th Thursday

    Every man dies, but not every man really lives. 每个人都会死,但不是每个人都曾经真真活过. As I become older and older, I ...

  8. spring集成activeMQ

    1.安装activehttp://activemq.apache.org/activemq-5140-release.html2.运行D:\apache-activemq-5.14.0\bin\win ...

  9. Linear regression with multiple variables(多特征的线型回归)算法实例_梯度下降解法(Gradient DesentMulti)以及正规方程解法(Normal Equation)

    ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, ,, , ...

  10. NYOJ题目874签到

    aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAswAAAIzCAIAAACbd9iBAAAgAElEQVR4nO3dPXLjSNou0G8T8rUQ2V