HTML多表头表格代码

所属分类: 网页制作 / HTML/Xhtml 阅读数: 600
收藏 0 赞 0 分享
1、多表头表格代码

复制代码
代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>多表头表格</title>
<style type="text/css">
body{
width:98%;
height:100%;
font-size:12px;
background-color:#FCF;
text-align:center;
}
#tab{
width:100%;
height:100%;
font-size:12px;
font-family:Verdana, Geneva, sans-serif Georgia, "Times New Roman", Times, serif;
font-weight:bolder;
background-color:#9F0;
}
</style>
</head>
<body>
<table id="tab" cellpadding="1" cellspacing="1" border="1">
<tr>
<th rowspan="2">序号</th>
<th colspan="2">王五</th>
<th colspan="2">李四</th>
<th colspan="2">孙传</th>
<th colspan="2">胡平</th>
<th rowspan="2">合计</th>
</tr>
<tr>
<th>语文</th>
<th>数学</th>
<th>语文</th>
<th>数学</th>
<th>语文</th>
<th>数学</th>
<th>语文</th>
<th>数学</th>
</tr>
<tr>
<th>1</th>
<th>78</th>
<th>96</th>
<th>67</th>
<th>98</th>
<th>88</th>
<th>75</th>
<th>94</th>
<th>69</th>
<th> </th>
</tr>
<tr>
<th>2</th>
<th>89</th>
<th>68</th>
<th>77</th>
<th>87</th>
<th>84</th>
<th>76</th>
<th>71</th>
<th>87</th>
<th> </th>
</tr>
<tr>
<th>3</th>
<th>75</th>
<th>78</th>
<th>89</th>
<th>74</th>
<th>65</th>
<th>68</th>
<th>98</th>
<th>90</th>
<th></th>
</tr>
<tr>
<th>4</th>
<th>79</th>
<th>89</th>
<th>65</th>
<th>62</th>
<th>64</th>
<th>87</th>
<th>97</th>
<th>91</th>
<th></th>
</tr>
<tr>
<th>5</th>
<th>89</th>
<th>96</th>
<th>67</th>
<th>76</th>
<th>74</th>
<th>84</th>
<th>67</th>
<th>81</th>
<th></th>
</tr>
<tr>
<th>6</th>
<th>94</th>
<th>90</th>
<th>97</th>
<th>74</th>
<th>62</th>
<th>81</th>
<th>78</th>
<th>78</th>
<th></th>
</tr>
<tr>
<th>7</th>
<th>78</th>
<th>89</th>
<th>77</th>
<th>87</th>
<th>45</th>
<th>86</th>
<th>77</th>
<th>98</th>
<th></th>
</tr>
<tr>
<th>8</th>
<th>65</th>
<th>67</th>
<th>94</th>
<th>68</th>
<th>87</th>
<th>69</th>
<th>78</th>
<th>68</th>
<th></th>
</tr>
<tr>
<th>9</th>
<th>86</th>
<th>98</th>
<th>87</th>
<th>87</th>
<th>65</th>
<th>78</th>
<th>98</th>
<th>79</th>
<th></th>
</tr>
<tr>
<th>10</th>
<th>88</th>
<th>75</th>
<th>77</th>
<th>97</th>
<th>97</th>
<th>77</th>
<th>70</th>
<th>87</th>
<th></th>
</tr>
</table>
</body>
</html>

2、运行结果
更多精彩内容其他人还在看

html 网页中的锚点(命名锚记)的使用介绍

html中的锚点想必大家并不陌生吧,锚点是网页制作中超级链接的一种,又叫命名锚记,下面以实例的方式为大家介绍下锚点的使用,不了解的朋友可不要错过哦
收藏 0 赞 0 分享

html中使用js来获取本地系统时间

获取本地系统时间的方法有很多,接下来为大家介绍喜爱使用js获取的具体实现,感兴趣的可以参考下
收藏 0 赞 0 分享

表单文件选择框样式自定义示例

大家都知道表单文件的选择框样式都是默认的,很不美观,下面就为大家写一个,感兴趣的朋友可以了解下
收藏 0 赞 0 分享

让pre标签自动换行示例代码

pre 元素可定义预格式化的文本。被包围在 pre 元素中的文本通常会保留空格和换行符,下面为大家介绍下如何让pre标签自动换行,感兴趣的朋友可以参考下
收藏 0 赞 0 分享

DIV背景半透明文字不半透明的样式

DIV背景半透明,DIV中的字不半透明如何实现,下面有个不错的示例,感兴趣的朋友可以了解下
收藏 0 赞 0 分享

html中的div、td 、p 等容器内强制换行和不换行的实现

div、td 、p 等容器内强制换行和不换行,在某些情况下还是比较实用的,下面本文整理了一些相关方面的知识,并有具体的实现方法,需要的朋友可以参考下
收藏 0 赞 0 分享

html 文本框(text)不可用只读的多种实现方法

有时候,我们希望表单中的文本框是只读的,让用户不能修改其中的信息,本文整理了多种实现方法,感兴趣的朋友可以参考下
收藏 0 赞 0 分享

HTML网页头部代码实例详解

HTML中我们一般把部分称为网页的头部。头部部分的内容虽然不会在页面中显示,但它能影响到搜索引擎对网页的收录和排序,以及网页的各种全局设置,可以说是至关重要
收藏 0 赞 0 分享

Html注释 Html中标记文字注释的符号

HTML注释,我们经常要在一些代码旁做一些HTML注释,这样做的好处很多,比如:方便查找,方便比对,方便项目组里的其它程序员了解你的代码,而且可以方便以后你对自己代码的理解与修改等等
收藏 0 赞 0 分享

Html 元素隐藏的几种方式

隐藏Html元素的方法最常用的方法有,css的display:none,一种方法两种实现方式,感兴趣的朋友可以了解下
收藏 0 赞 0 分享
查看更多