Phần tử HTML
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0 biểu thị dữ liệu dạng bảng — nghĩa là thông tin được trình bày trong bảng hai chiều bao gồm các hàng và cột của các ô chứa dữ liệuThử nó
Danh mục nội dung Nội dung luồng Nội dung được phép Theo thứ tự này
- một phần tử
1 tùy chọn,Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
- không hoặc nhiều phần tử
2,Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
- một phần tử
3 tùy chọn,Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
- một trong những điều sau đây
- không hoặc nhiều phần tử
4Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
- một hoặc nhiều phần tử
5Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
- không hoặc nhiều phần tử
- một phần tử
6 tùy chọnSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
7Các vai trò ARIA được phép Bất kỳ giao diện DOM nàoSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
8Thuộc tính
Phần tử này bao gồm các thuộc tính toàn cục
Thuộc tính không dùng nữa
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
9 Không dùng nữaThuộc tính liệt kê này chỉ ra cách bảng phải được căn chỉnh bên trong tài liệu chứa. Nó có thể có các giá trị sau
00. bảng được hiển thị ở phía bên trái của tài liệu;Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
01. bảng được hiển thị ở trung tâm của tài liệu;Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
02. bảng được hiển thị ở phía bên phải của tài liệuSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
Đặt
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
03 và Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
04 thành Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
05 hoặc Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
06 thành Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
07 để đạt được hiệu ứng tương tự như thuộc tính căn chỉnhSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
08 Không dùng nữaMàu nền của bảng. Đó là mã RGB gồm 6 chữ số, có tiền tố là '
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
09'. Một trong những từ khóa màu được xác định trước cũng có thể được sử dụngĐể đạt được hiệu quả tương tự, hãy sử dụng thuộc tính CSS
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
00Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
01 Không dùng nữaThuộc tính số nguyên này xác định, tính bằng pixel, kích thước của khung bao quanh bảng. Nếu được đặt thành 0, thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
02 được đặt thành voidĐể đạt được hiệu ứng tương tự, hãy sử dụng thuộc tính tốc ký CSS
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
01Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
04 Không dùng nữaThuộc tính này xác định khoảng cách giữa nội dung của một ô và đường viền của nó, được hiển thị hay không. Nếu độ dài của phần đệm ô được xác định bằng pixel, không gian có kích thước pixel này sẽ được áp dụng cho cả bốn cạnh của nội dung ô. Nếu độ dài được xác định bằng giá trị phần trăm, thì nội dung sẽ được căn giữa và tổng không gian theo chiều dọc [trên cùng và dưới cùng] sẽ biểu thị giá trị này. Điều này cũng đúng với tổng không gian ngang [trái và phải]
Để đạt được hiệu quả tương tự, hãy áp dụng thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
05 cho phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0, với giá trị được đặt thành thu gọn và thuộc tính Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
07 cho phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
08Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
09 Không dùng nữaThuộc tính này xác định kích thước của khoảng cách giữa hai ô theo giá trị phần trăm hoặc pixel. Thuộc tính được áp dụng theo cả chiều ngang và chiều dọc, cho khoảng cách giữa đầu bảng và các ô của hàng đầu tiên, bên trái của bảng và cột đầu tiên, bên phải của bảng và cột cuối cùng và cuối cùng của bảng.
Để đạt được hiệu ứng tương tự, hãy áp dụng thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
00 cho phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0. Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
00 không có bất kỳ ảnh hưởng nào nếu Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
05 được đặt thành thu gọnSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
02 Không dùng nữaThuộc tính liệt kê này xác định phía nào của khung bao quanh bảng phải được hiển thị
Để đạt được hiệu quả tương tự, hãy sử dụng các thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
05 và Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
06Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
07 Không dùng nữaThuộc tính liệt kê này xác định quy tắc ở đâu, tôi. e. dòng, sẽ xuất hiện trong một bảng. Nó có thể có các giá trị sau
08, cho biết rằng sẽ không có quy tắc nào được hiển thị;Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
09, điều này sẽ khiến các quy tắc được hiển thị giữa các nhóm hàng [được xác định bởi các phần tửSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
3,Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
4 vàSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
6] và giữa các nhóm cột [chỉ được xác định bởi các phần tửSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
33 vàSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
2];Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
35, điều này sẽ khiến các quy tắc được hiển thị giữa các hàng;Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
36, điều này sẽ khiến các quy tắc được hiển thị giữa các cột;Simple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
37, điều này sẽ khiến các quy tắc được hiển thị giữa các hàng và cộtSimple table with header First name Last name John Doe Jane Doe Table with thead, tfoot, and tbody Header content 1 Header content 2 Body content 1 Body content 2 Footer content 1 Footer content 2 Table with colgroup Countries Capitals Population Language USA Washington, D.C. 309 million English Sweden Stockholm 9 million Swedish Table with colgroup and col Lime Lemon Orange Green Yellow Orange Simple table with caption Awesome caption Awesome data
Để đạt được hiệu ứng tương tự, hãy áp dụng thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
01 cho các phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
3, Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
4, Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
6, Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
33 hoặc Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
2 thích hợpSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
44 Không dùng nữaThuộc tính này xác định một văn bản thay thế tóm tắt nội dung của bảng. Sử dụng phần tử
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
1 thay thếSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
46 Không dùng nữaThuộc tính này xác định chiều rộng của bảng. Thay vào đó, hãy sử dụng thuộc tính CSS
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
46ví dụ
bảng đơn giản
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
8Các ví dụ đơn giản khác
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0sắp xếp bảng
Sắp xếp các hàng của bảng
Không có phương thức gốc nào để sắp xếp các hàng [
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
5 phần tử] của bảng HTML. Nhưng bằng cách sử dụng Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
49, Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
30, Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
31 và Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
32, bạn có thể triển khai hàm Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
33 của riêng mình để sắp xếp một Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
34 trong số các phần tử của Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
5In the below example, you can see such an example. We are attaching it to the
element so that it sorts the table cells in order of increasing value, and updates the display to suit.HTMLSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0JavaScriptSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0Kết quảSắp xếp các hàng bằng một cú nhấp chuột vào phần tử thứ
Ví dụ sau thêm một trình xử lý sự kiện vào mọi phần tử
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
36 của mọi Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
0 trong Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
38; Ghi chú. Giải pháp này giả định rằng các phần tử
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
08 được điền bằng văn bản thô không có phần tử con cháuHTMLSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
3JavaScriptSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
4Kết quảHiển thị các bảng lớn trong không gian nhỏ
Một vấn đề phổ biến với các bảng trên web là chúng không hoạt động tốt trên màn hình nhỏ khi lượng nội dung lớn và cách để làm cho chúng có thể cuộn được không rõ ràng, đặc biệt khi đánh dấu có thể đến từ CDN
Ví dụ này cung cấp một cách để hiển thị các bảng trong không gian nhỏ. Chúng tôi đã ẩn nội dung HTML vì nó rất lớn và không có gì đáng chú ý về nó. CSS hữu ích hơn để kiểm tra trong ví dụ này
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
3Khi nhìn vào các kiểu này, bạn sẽ nhận thấy rằng thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
52 của bảng đã được đặt thành Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
53. Trong khi điều này cho phép cuộn, bảng sẽ mất đi một số tính toàn vẹn của nó và các ô của bảng cố gắng trở nên nhỏ nhất có thể. Để giảm thiểu vấn đề này, chúng tôi đã đặt Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
54 thành Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
55 trên Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
4. Tuy nhiên, chúng tôi không làm điều này cho Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
3 để tránh các tiêu đề dài buộc các cột phải rộng hơn mức cần thiết để hiển thị dữ liệuĐể giữ các tiêu đề bảng trên trang trong khi cuộn xuống, chúng tôi đã đặt
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
58 thành cố định trên các phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
36. Lưu ý rằng chúng tôi chưa đặt Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
05 thành Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
91, vì nếu chúng tôi làm như vậy thì không thể tách chính xác tiêu đề khỏi phần còn lại của bảngSimple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
5Kết quả
Mối quan tâm về khả năng tiếp cận
chú thích
Bằng cách cung cấp phần tử
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
1 có giá trị mô tả rõ ràng và chính xác mục đích của bảng, nó giúp mọi người quyết định xem họ có cần đọc phần còn lại của nội dung bảng hay bỏ qua phần đóĐiều này giúp mọi người điều hướng với sự trợ giúp của công nghệ hỗ trợ như trình đọc màn hình, những người có tình trạng thị lực kém và những người có vấn đề về nhận thức
- MDN Adding a caption to your table with
- Chú thích và Tóm tắt • Bảng • Hướng dẫn truy cập web W3C WAI
Phạm vi hàng và cột
Thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
93 trên các phần tử tiêu đề là dư thừa trong các ngữ cảnh đơn giản, vì phạm vi được suy ra. Tuy nhiên, một số công nghệ hỗ trợ có thể không đưa ra kết luận chính xác, do đó, việc chỉ định phạm vi tiêu đề có thể cải thiện trải nghiệm người dùng. Trong các bảng phức tạp, phạm vi có thể được chỉ định để cung cấp thông tin cần thiết về các ô liên quan đến tiêu đềThí dụ
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
9Cung cấp khai báo
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
94 trên phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
36 sẽ giúp mô tả rằng ô nằm ở đầu cột. Cung cấp khai báo Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
96 trên phần tử Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
36 sẽ giúp mô tả rằng ô này là ô đầu tiên trong một hàng- Bảng MDN dành cho người dùng khiếm thị
- Bảng có hai tiêu đề • Bảng • W3C WAI Web Accessibility Tutorials
- Bảng có tiêu đề không đều • Bảng • W3C WAI Web Accessibility Tutorials
- H63. Sử dụng thuộc tính phạm vi để liên kết ô tiêu đề và ô dữ liệu trong bảng dữ liệu. Kỹ thuật W3C cho WCAG 2. 0
bảng phức tạp
Công nghệ hỗ trợ chẳng hạn như trình đọc màn hình có thể gặp khó khăn khi phân tích bảng phức tạp đến mức các ô tiêu đề không thể được liên kết theo cách ngang hoặc dọc nghiêm ngặt. Điều này thường được biểu thị bằng sự hiện diện của các thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
98 và Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
99Tốt nhất, hãy xem xét các cách thay thế để trình bày nội dung của bảng, bao gồm chia nhỏ nó thành một tập hợp các bảng nhỏ hơn, có liên quan mà không phải dựa vào việc sử dụng các thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
98 và Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
99. Ngoài việc giúp những người sử dụng công nghệ hỗ trợ hiểu nội dung của bảng, điều này cũng có thể có lợi cho những người có mối quan tâm về nhận thức, những người có thể gặp khó khăn trong việc hiểu các mối liên hệ mà cách bố trí bảng đang mô tảNếu không thể chia nhỏ bảng, hãy sử dụng kết hợp các thuộc tính
Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
02 và Simple table with header
First name
Last name
John
Doe
Jane
Doe
Table with thead, tfoot, and tbody
Header content 1
Header content 2
Body content 1
Body content 2
Footer content 1
Footer content 2
Table with colgroup
Countries
Capitals
Population
Language
USA
Washington, D.C.
309 million
English
Sweden
Stockholm
9 million
Swedish
Table with colgroup and col
Lime
Lemon
Orange
Green
Yellow
Orange
Simple table with caption
Awesome caption
Awesome data
03 để liên kết theo chương trình từng ô của bảng với [các] tiêu đề mà ô được liên kết với