【caption,thead,tfoot,tbody的使用以及使用nowrap禁止换行】

<!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>
    <style type="text/css">
        thead{
            background-color: red;
            color: white;
        }
        tfoot{
            background-color: green;
        }
    </style>
</head>
<body>
<table border="1" width="400px" align="center">
    <caption>这是表格的标题</caption>
    <thead>
    <tr>
        <th nowrap>行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一
            行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一行头一</th>
        <th nowrap>行头二</th>
        <th nowrap>行头三</th>
    </tr>
    </thead>
    <tfoot>
    <tr>
        <th>行尾一</th>
        <th>行尾二</th>
        <th>行尾三</th>
    </tr>
    </tfoot>
    <tbody>
    <tr>
        <td>内容一</td>
        <td>内容二</td>
        <td>内容三</td>
    </tr>
    </tbody>
</table>
</body>
</html>
时间: 2024-08-26 07:23:42

【caption,thead,tfoot,tbody的使用以及使用nowrap禁止换行】的相关文章

thead tfoot tbody标签的使用

这三个都是<body>元素的子标签,不常用,因为其只是对<tr>标签做了一个区分 <thread>用于包裹表格头信息 <tfoot>用于包裹表格最后一行,不管将 tfoot 元素放在表格的什么位置,最后都会显示在最后一行 <tbody>用于包裹表格内容信息 使用举例 1 <!DOCTYPE html> 2 <html> 3 <head lang="en"> 4 <meta charse

发现是在IE6-IE9下,下列元素table,thead,tfoot,tbody,tr,col,colgroup,html,title,style,frameset的innerHTML属性是只读的

table ID="zhutiTable" html2="<tr></tr>": 的数据 setTableInnerHTML(document.getElementById('zhutiTable'), html2); function setTableInnerHTML(table, html) {//table 为table对象,html为生成的html字符串   if (navigator && navigator.us

table标签中thead、tbody、tfoot的作用

为了让大表格(table)在下载的时候可以分段的显示,就是说在浏览器解析HTML时,table是作为一个整体解释的,使用tbody可以优化显示.如果表格很长,用tbody分段,可以一部分一部分地显示,不用等整个表格都下载完成.下载一块显示一块,表格巨大时有比较好的效果. tbody.tfoot.thead一般来说用得不是很多,对于比较复杂的页面,页面的排版用到了很多的表格,表格的结构也就相对的复杂了,所以又将表格分割成三个部分:题头.正文和脚注.而这三部分分别用: thead, tbody, t

设置GridView、DataGrid 以提供thead、tbody等标签

一.简述 做项目用到了GridView.DataGrid(原谅公司,既然还用DataGrid => 又从以前的项目中搬代码 - - !!! ).然后想为其增加 thead.tbody 好兼容JQuery的js插件. 二.内容 GridView代码 GridView1.DataSource = fakeDataTable; GridView1.DataBind(); GridView1.HeaderRow.TableSection = TableRowSection.TableHeader; Da

纯CSS,table的thead固定,tbody显示滚动条

首先是html的table的代码: 1 <table class="tablediv" id="myTable" border="1"> 2 <thead> 3 <tr> 4 <td class="wt40">111asdasdassd</td> 5 <td class="wt50">222asdsa</td> 6 <

html-3,table 表格标签 tr th td caption thead tbody tfoot 的简单使用

1 <!-- 2 table border='1' style="border-collapse:collapse;" 3 border 表格的像素宽度 4 border-collapse:collapse 为表格设置合并边框模型 5 tr 表格行 一个tr包含多个th 或td 6 th 表示居中加粗 7 td 表格描述(默认正常显示) 8 9 caption 标题独占一行 在表格外面 10 thead tbody tfoot 无论顺序是怎么写的 他会自动按这个顺序展示 11 -

thead固定tbody滚动

table tbody { display:block; height:195px; overflow-y:scroll; } table thead, tbody tr { display:table; width:100%; table-layout:fixed; } table thead { width: calc( 100% - 1em ) }

Jsoup代码解读之三-Document的输出

Jsoup代码解读之三-Document的输出 Jsoup官方说明里,一个重要的功能就是output tidy HTML.这里我们看看Jsoup是如何输出HTML的. HTML相关知识 分析代码前,我们不妨先想想,“tidy HTML"到底包括哪些东西: 换行,块级标签习惯上都会独占一行 缩进,根据HTML标签嵌套层数,行首缩进会不同 严格的标签闭合,如果是可以自闭合的标签并且没有内容,则进行自闭合 HTML实体的转义 这里要补充一下HTML标签的知识.HTML Tag可以分为block和inl

xhtml1-strict.dtd

<!-- Extensible HTML version 1.0 Strict DTD This is the same as HTML 4 Strict except for changes due to the differences between XML and SGML. Namespace = http://www.w3.org/1999/xhtml For further information, see: http://www.w3.org/TR/xhtml1 Copyright