数据库为一个表建立临时表_建立一个可访问HTML表

数据库为一个表建立临时表

The basic structure of an HTML table consists of a table tag, rows, and an equal number of table cells in each row. That’s where most developers leave things, but it’s not enough: a table on a web page should have several elements added in order to make it both accessible and far easier to style with .

HTML表格的基本结构由表格标签,行和每行中相等数量的表格单元组成。 那是大多数开发人员留下的东西,但这还不够:网页上的表应该添加几个元素,以使其易于访问并且更容易使用

A correctly structured table should usually have at least one set of table header cells, indicating the meaning or interpretation of the data in the cells of the columns underneath. Much like a web page, a table should be divided into table head (<thead>) and table body (<tbody>) sections, with an optional <tfoot> section that (rather paradoxically) must immediately follow the <thead> if it’s included. (Despite the order of the code, a modern browser will display the <tfoot> section last in the table. Think of the <tfoot> section as an opportunity to display summed or summary data for each row.)

一个结构正确的表通常应至少具有一组表标题单元格,以指示下面各列单元格中数据的含义或解释。 就像网页一样,表应该分为表头( <thead> )和表主体( <tbody> )两个部分,并带有一个可选的<tfoot>部分(反而是)必须紧跟在<thead>之后包括在内。 (尽管代码顺序不同,现代浏览器仍将在表的最后显示<tfoot>部分。将<tfoot>部分视为显示每行汇总或汇总数据的机会。)

An example of a correctly sectioned table is shown below, with closing tags (optional in HTML5) removed to save space:

下面显示了一个正确划分的表的示例,其中删除了结束标记(HTML5中的可选标记)以节省空间:

<table>
	<caption>Top Selling Processors</caption>
	<thead>
		<tr>
			<th>Processor
			<th>Speed
			<th>Cores
			<th>L3 Cache Size
	<tbody>
		<tr>
			<td>Intel Core i7-2600K
			<td>3.4 GHz
			<td>4
			<td>8 MB
		<tr>
			<td>AMD Phenom II X6 1100T
			<td>3.3 GHz
			<td>6
			<td>6 MB
</table>

A correct table works very well in screen readers for the blind: with the tags and attributes I’ve shown added to the code, accessible software will never mistake your table for a layout element, and will allow a blind user to navigate your data with ease.

正确的表在盲人的屏幕阅读器中非常有效:通过将我在代码中显示的标签和属性添加到代码中,可访问的软件将永远不会将您的表误认为是布局元素,并允许盲人使用来导航数据缓解。

翻译自: https://thenewcode.com/554/Build-An-Accessible-HTML-Table

数据库为一个表建立临时表

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值