html中 table的 colspan和rowspan

Colspan = 单元格跨越多列; Rowspan= 单元格跨越多行

复制代码
<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
<title></title> 
</head>
<body>




<h4>单元格跨两列:</h4>
<table border="1">
<tr>
  <th>Name</th>
  <th colspan="2">Telephone</th>
</tr>
<tr>
  <td>Bill Gates</td>
  <td>555 77 854</td>
  <td>555 77 855</td>
</tr>
</table>





<h4>单元格跨两行:</h4>
<table border="1">
<tr>
  <th>First Name:</th>
  <td>Bill Gates</td>
</tr>
<tr>
  <th rowspan="2">Telephone:</th>
  <td>555 77 854</td>
</tr>
<tr>
  <td>555 77 855</td>
</tr>
</table>




</body>
</html>

显示:

相关推荐
政采云技术2 分钟前
深入理解 setState 执行机制
前端·react.js
清汤饺子3 分钟前
Everything Claude Code:让我把 AI 编程效率再翻一倍的东西
前端·javascript·后端
西洼工作室11 分钟前
React TabBar切换与高亮实现
前端·javascript·react.js
belldeep14 分钟前
前端:Bootstrap 3.0 , 4.0 , 5.0 有什么差别?
前端·bootstrap·html
wuhen_n20 分钟前
Tool Schema 设计模式详解
前端·javascript·ai编程
码喽7号20 分钟前
Vue学习三:element-plus组件和FontAwesome图标组件
前端·vue.js·学习
2501_9159184121 分钟前
WebKit 抓包,WKWebView 请求的完整数据获取方法
android·前端·ios·小程序·uni-app·iphone·webkit
mcooiedo22 分钟前
Go-Gin Web 框架完整教程
前端·golang·gin
小陈工23 分钟前
Python Web开发入门(一):虚拟环境与依赖管理,从零搭建纯净开发环境
开发语言·前端·数据库·git·python·docker·开源
wuhen_n23 分钟前
排列算法完全指南 - 从全排列到N皇后,一套模板搞定所有排列问题
前端·javascript·算法