【代码笔记】Web-HTML-表格
一,效果图。




二,代码。

<!DOCTYPE html>
<html> <head>
<meta charset="utf-8">
<title>html 表格</title>
</head> <body>
<!--表格-->
<p>
Each table starts with a table tag. Each table row starts with a tr tag. Each table data starts with a td tag.
</p>
<h4>one column:</h4>
<table border="1">
<tr>
<td>100</td>
</tr>
</table>
<h4>one row and theree columns:</h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
</table>
<h4>tow rows and there columns:<h4>
<table border="1">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
<td>600</td>
</tr>
</table> <!--表格实例-->
<table border="1">
<tr>
<td>row 1,cell 1</td>
<td>row 1,clee 2</td>
</tr>
<tr>
<td>row 2,cell 1</td>
<td>row 2,cell 2</td>
</tr>
</table>
<!--表格表头-->
<table border="1">
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
<tr>
<td>row 1,cell 1</td>
<td>row 1,cell 2</td>
</tr>
<tr>
<td>row 2,cell 1</td>
<td>row 2,cell 2</td>
</tr>
</table>
<!--没有边框的表格-->
<h4>this table has no bordrs:</h4>
<table>
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<tr>
<td>400</td>
<td>500</td>
<td>600</td>
</tr>
</table>
<h4>And this table has no borders:</h4>
<table border="0">
<tr>
<td>100</td>
<td>200</td>
<td>300</td>
</tr>
<td>400</td>
<td>500</td>
<td>600</td>
<tr>
</tr>
</table>
<!--表格中的表头-->
<h4>Table headers:</h4>
<table border="1">
<tr>
<th>Name</th>
<th>telephone</th>
<th>Telephone</th>
</tr>
<tr>
<td>bill</td>
<td>3333</td>
<td>9999</td>
</tr>
</table>
<h4>vertical headers:</h4>
<table border="1">
<tr>
<th>first name:</th>
<td>bill</td>
</tr>
<tr>
<th>telephone:</th>
<td>777</td>
</tr>
<tr>
<th>telephone:</th>
<td>999</td>
</tr>
</table>
<!--带有标题的表格-->
<table border="1">
<caption>Monthly savings</caption>
<tr>
<th>month</th>
<th>saving</th>
</tr>
<tr>
<td>Jan</td>
<td>$100</td>
</tr>
<tr>
<td>feb</td>
<td>$50</td>
</tr>
</table>
<!--跨行或跨列的表格-->
<h4>cell that spans tow columns:</h4>
<table border="1">
<tr>
<th>name</th>
<th colspan="2">telephone</th>
</tr>
<tr>
<td>bill</td>
<td>4444</td>
<td>999</td>
</tr>
</table>
<h4>cell that spans two rows:</h4>
<table border="1">
<tr>
<th>first name:</th>
<td>bill</td>
</tr>
<tr>
<th rowspan="2">telephone:</th>
<td>88888</td>
</tr>
<tr>
<td>888888</td>
</tr>
</table>
<!--表格内的标签-->
<table border="1">
<tr>
<td>
<p>This is a paragraph</p>
<p>This is another paragraph</p>
</td>
<td>This cell contains a table:
<table border="1">
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>C</td>
<td>D</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>This cell contains a list
<ul>
<li>apples</li>
<li>bananas</li>
<li>pineapples</li>
</ul>
</td>
<td>HELLO</td>
</tr>
</table>
<!--单元格边距-->
<h4>without celladding:</h4>
<table border="1">
<tr>
<td>first</td>
<td>row</td>
</tr>
<tr>
<td>second</td>
<td>row</td>
</tr>
</table>
<h4>with cellpadding:</h4>
<table border="1" cellpadding="10">
<tr>
<td>first</td>
<td>row</td>
</tr>
<tr>
<td>second</td>
<td>row</td>
</tr>
</table>
<!--单元格间距离-->
<h4>without cellspacing:</h4>
<table border="1">
<tr>
<td>first</td>
<td>row</td>
</tr>
<tr>
<td>second</td>
<td>row</td>
</tr>
</table>
<h4>without cellspacing:</h4>
<table border="1" cellspacing="0">
<tr>
<td>first</td>
<td>row</td>
</tr>
<tr>
<td>second</td>
<td>row</td>
</tr>
</table>
<h4>without cellspacing:</h4>
<table border="1" cellspacing="10">
<tr>
<td>first</td>
<td>row</td>
</tr>
<tr>
<td>second</td>
<td>row</td>
</tr>
</table>
</body> </html>

参考资料:《菜鸟教程》
【代码笔记】Web-HTML-表格的更多相关文章
- Web jquery表格组件 JQGrid 的使用 - 全部代码
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- 《编写高质量代码:Web 前端开发修炼之道》 笔记与读后感
编写高质量代码:Web 前端开发修炼之道/曹刘阳著. —北京:机械工业出版社,2010.5 第一版 涉及到的知识点: 1. CSS Sprites 在国内很多人叫css精灵,是一种网页图片应用处理方式 ...
- Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引
因为内容比较多,所以每篇讲解一些内容,最后会放出全部代码,可以参考.操作中总会遇到各式各样的问题,个人对部分问题的研究在最后一篇 问题研究 里.欢迎大家探讨学习. 代码都经过个人测试,但仍可能有各种未 ...
- Web jquery表格组件 JQGrid 的使用 - 11.问题研究
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数、ColModel API、事件及方法
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- Web jquery表格组件 JQGrid 的使用 - 5.Pager翻页、搜索、格式化、自定义按钮
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- Web jquery表格组件 JQGrid 的使用 - 6.准备工作 & Hello JQGrid
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- Web jquery表格组件 JQGrid 的使用 - 7.查询数据、编辑数据、删除数据
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- Web jquery表格组件 JQGrid 的使用 - 8.Pager、新增数据、查询、刷新、查看数据
系列索引 Web jquery表格组件 JQGrid 的使用 - 从入门到精通 开篇及索引 Web jquery表格组件 JQGrid 的使用 - 4.JQGrid参数.ColModel API.事件 ...
- <Python Text Processing with NLTK 2.0 Cookbook>代码笔记
如下是<Python Text Processing with NLTK 2.0 Cookbook>一书部分章节的代码笔记. Tokenizing text into sentences ...
随机推荐
- Android开发 - 掌握ConstraintLayout(二)介绍
介绍 发布时间 ConstraintLayout是在2016的Google I/O大会上发布的,经过这么长时间的更新,现在已经非常稳定. 支持Android 2.3(API 9)+ 目前的Androi ...
- word文档的python解析
主要两块,第一个是文件类型的转换,第二个是用docx包去对word文档中的table进行parse 1. 文件格式装换 因为很多各种各样的原因,至今还有一些word文档是doc的格式存的,对于这种,如 ...
- fatal: protocol error: bad line length character: This
昨晚尝试搭建一个Git服务器,在搭建好服务器后,在服务器创建了一个空项目,我在本地使用git clone 拉取项目时,报了fatal: protocol error: bad line length ...
- 生成多个git ssh密钥
如果你已经有了一套名为 id_rsa 的公秘钥,将要生成另外一个公钥,比如 aysee ,你也可以使用任何你喜欢的名字. 步骤如下: 1.生成一个新的自定义名称的公钥: ssh-keygen -t r ...
- tar与压缩详解
.gz gzip gunzip(gzip -d) .zip .rar .bz2 gzip压缩文件不保留原文件 , 不能压缩目录 gzip filename.x 用gzip压缩文件 gun ...
- Apache重写规则
1..htaccess文件使用前提 .htaccess的主要作用就是实现url改写,也就是当浏览器通过url访问到服务器某个文件夹时,作为主人,我们可以来接待这个url,具体 地怎样接待它,就是此文件 ...
- Eclipse中java内存溢出
1.点击Window --->Preferences,如下图
- 一站式SpringBoot for NoSQL Study Tutorial 开发教程学习手册
SpringBoot2.0 + NoSQL使用教程,项目名称:“SpringBoot2NoSQL” 项目地址: https://gitee.com/475660/SpringBoot2NoSQL 项目 ...
- Python函数——闭包延迟绑定
前言 请看下面代码 def multipliers(): return [lambda x : i*x for i in range(4)] print ([m(2) for m in multipl ...
- [EXP]Drupal < 8.6.10 / < 8.5.11 - REST Module Remote Code Execution
Analyzing the patch By diffing Drupal and , we can see that in the REST module, FieldItemNormalizer ...