数据分析,一般都需要显示数据,就需要使用html做复杂的表格。复杂表格一般是对td的rowspan 、colspan属性值。

在html中<td> 标签定义 HTML 表格中的标准单元格。

  (1)rowspan 属性规定单元格可横跨的行数;

  (2)colspan 属性规定单元格可横跨的列数。

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>复杂表格</title>
</head>
<body>
<center>
<table width = "20%" border="1">
<tr>
<th>网站</th>
<th colspan="2">统计情况</th> <!-- colspan="2" 占位,表示这一列占2列 -->
</tr>
<tr>
<td rowspan="3">奇虎360</td> <!-- rowspan="2" 占位,表示这一列占3行 -->
<td>http://hao.360.cn/</td>
<td>11</td>
</tr>
<tr>
<td>http://sh.qihoo.com/</td>
<td>22</td>
</tr>
<tr>
<td>http://video.so.com/</td>
<td>33</td>
</tr>
</table>
</center>
</body>
</html>

显示效果

rowspan 、colspan 可以理解为占位。占行数、列数。

关于html 制作table的一个注意点的更多相关文章

  1. Css制作table细线表格

    制作细线表格,我想应该是最基本的css知识了,记录下来巩固下. 推荐: table{ border-collapse:collapse; border: 1px solid #000000; } td ...

  2. 使用dwr时动态生成table的一个小技巧

    这篇随笔是我在07年写的,因为当时用了自己建设的blog,后来停止使用了,今天看到备份数据库还在,恢复出来放到这里.留着记录用. 我在使用DWR时,试了很多次都无法在动态生成的table中的一个或多个 ...

  3. [CareerCup] 8.10 Implement a Hash Table 实现一个哈希表

    8.10 Design and implement a hash table which uses chaining (linked lists) to handle collisions. 这道题让 ...

  4. 使用前端技术和MySQL+PHP制作自己的一个个人博客网站

    源代码地址:https://github.com/YauCheun/BlogCode 我的博客网站地址:http://www.yublog.fun/ 制作前景: 想拥有一个自己独自开发的一个小型博客网 ...

  5. 学习笔记:ALTERing a Huge MySQL Table - 对一个超大表做alter调整

    Table of Contents The ProblemFuture SolutionsOverview of SolutionShortcutAssumptions/Restrictions/Co ...

  6. DROP TABLE - 删除一个表

    SYNOPSIS DROP TABLE name [, ...] [ CASCADE | RESTRICT ] DESCRIPTION 描述 DROP TABLE 从数据库中删除表或视图. 只有其所有 ...

  7. CREATE TABLE - 定义一个新表

    SYNOPSIS CREATE [ [ GLOBAL | LOCAL ] { TEMPORARY | TEMP } ] TABLE table_name ( { column_name data_ty ...

  8. 把两个table放在一个Repeater中显示

    DataTable dt; DataTable dt1; HLoanApplyInfo applyInfo = HLoanApplyBll.GetModelById(FLoanID); FLoanID ...

  9. [转][layui]table 的一个BUG

    转换静态表格,一直只能显示 10 行,研究发现解决方法有两个:1.参数里: limit: 30, 添加参数以确保显示更多行2.修改 table.js 里面的 F.prototype.config ,添 ...

随机推荐

  1. mint-ui loadmore 上拉加载的坑

    <div style="height:100vh;overflow: scroll;"> <mt-loadmore :top-method="loadT ...

  2. 2019-7-2-asp-dotnet-core-通过图片统计-csdn-用户访问

    title author date CreateTime categories asp dotnet core 通过图片统计 csdn 用户访问 lindexi 2019-7-2 19:21:2 +0 ...

  3. ie中报错---不能执行已释放 Script 的代码

    我的原因:使用jquery.colorbox.js.在页面中使用弹框,对于父页面中的变量进行修改(弹框页面的js--window.parent.obj.arr= 数组;), 当弹框关闭之后,在父页面中 ...

  4. springMVC项目创建及导入包项

    springMVC项目创建及导入包项 - zhangzhetaojj的博客 - CSDN博客https://blog.csdn.net/zhangzhetaojj/article/details/50 ...

  5. 在自己的工程中使用开源界面库Duilib

    配置duilib库 一个简单的使用Duilib程序一般要在stdafx.h中进行配置(链接duilib的文件,包括头文件).通常的配置代码如下: 1 2 3 4 5 6 7 8 9 10 11 12 ...

  6. PAT甲级——A1073 Scientific Notation

    Scientific notation is the way that scientists easily handle very large numbers or very small number ...

  7. Python - 基本数据类型及其常用的方法之数字与字符串

    数字(int): 1.int()(将字符串换为数字) a = " print(type(a), a) b = int(a) print(type(b), b) num = "a&q ...

  8. <每日一题>题目6:二分查找

    #二分查找 ''' 1.end问题 2.44对应的end<start 找不到情况 3.返回值递归的情况 4,611,aim太大的情况 ''' l = [2,3,5,10,15,16,18,22, ...

  9. highchart接收后台数据用法

    最近做数据分析的时候使用了highchart这个插件,从后台中接收数据的时候出了一些问题,记录下来免得以后忘了. $(function () { var list = {$weeklist}; var ...

  10. 2019-5-24-WPF-源代码-从零开始写一个-UI-框架

    title author date CreateTime categories WPF 源代码 从零开始写一个 UI 框架 lindexi 2019-05-24 15:54:36 +0800 2018 ...