Web Development & Design Foundations with HTML5 8th Edition
Learning Outcomes
HTML Table
HTML Table Elements
HTML Table Example
HTML Table Example 2
HTML Table Attributes
HTML Common Table Cell Attributes
HTML colspan Attribute
HTML rowspan Attribute
Accessibility and Tables
Checkpoint
Using CSS to Style a Table
CSS Structural Pseudo-classes
Table Row Groups
Checkpoint
Summary
1.48M
Categories: internetinternet programmingprogramming
Similar presentations:
HTMLTables
HTMLTables
HTML Tables
HTML Tables
Building the user interface by using HTML 5. Оrganization, input, and validation
Building the user interface by using HTML 5. Оrganization, input, and validation
HTML Table
HTML Table
Jadvallar
Jadvallar
Web technologies
Web technologies
Introduction to HTML/CSS (part 3)
Introduction to HTML/CSS (part 3)
Part II. Cascading Style Sheets (CSS)
Part II. Cascading Style Sheets (CSS)
Modern development tools of dynamic content of the websites
Modern development tools of dynamic content of the websites
HTML. Урок №5
HTML. Урок №5

Web Development & Design Foundations with HTML5 8th Edition

1. Web Development & Design Foundations with HTML5 8th Edition

Web Development & Design
Foundations with HTML5
8th Edition
CHAPTER 8
KEY CONCEPTS
Copyright © Terry Felke-Morris http://terrymorris.net
1

2. Learning Outcomes

In this chapter, you will learn how to ...
◦ Create a basic table with the table, table row, table header, and table
cell elements
◦ Configure table sections with the thead, tbody, and tfoot elements
◦ Increase the accessibility of a table
◦ Style an HTML table with CSS
◦ Describe the purpose of CSS structural pseudo-classes
Copyright © Terry Felke-Morris http://terrymorris.net
2

3. HTML Table

Tables are used on web pages
to organize tabular information
Composed of rows and columns – similar to a
spreadsheet.
Each individual table cell is at the intersection of a
specific row and column.
Configured with table, tr, and td elements
Copyright © Terry Felke-Morris http://terrymorris.net
3

4. HTML Table Elements

<table>
Contains the table
<tr>
Contains a table row
<td>
Contains a table cell
<caption>
Configures a description of the table
Copyright © Terry Felke-Morris http://terrymorris.net
4

5. HTML Table Example

<table border="1">
<caption>Bird Sightings</caption>
<tr>
<td>Name</td>
<td>Date</td>
HTML
Table Example
</tr>
<tr>
<td>Bobolink</td>
<td>5/25/10</td>
</tr>
<tr>
<td>Upland Sandpiper</td>
<td>6/03/10</td>
</tr>
</table>
Copyright © Terry Felke-Morris http://terrymorris.net
5

6. HTML Table Example 2

<table border="1">
<tr>
<th>Name</th>
<th>Birthday</th>
</tr>
HTML
Table Example 2
Using the <th> Element
<tr>
<td>James</td>
<td>11/08</td>
</tr>
<tr>
<td>Karen</td>
<td>4/17</td>
</tr>
<tr>
<td>Sparky</td>
<td>11/28</td>
</tr>
</table>
Copyright © Terry Felke-Morris http://terrymorris.net
6

7. HTML Table Attributes

•align (obsolete)
•bgcolor (obsolete)
•border
•cellpadding (obsolete)
•cellspacing (obsolete)
•summary (obsolete but may be reinstated)
•width (obsolete)
Use CSS to configure table characteristics instead of
HTML attributes
Copyright © Terry Felke-Morris http://terrymorris.net
7

8. HTML Common Table Cell Attributes

•align (obsolete)
•bgcolor (obsolete)
•colspan
•rowspan
•valign (obsolete)
•height (deprecated)
•width (deprecated)
Use CSS to configure most table cell characteristics instead of
HTML attributes
Copyright © Terry Felke-Morris http://terrymorris.net
8

9. HTML colspan Attribute

<table border="1">
<tr>
<td colspan=“2”>
Birthday List</td>
HTML colspan Attribute
</tr>
<tr>
<td>James</td>
<td>11/08</td>
</tr>
<tr>
<td>Karen</td>
<td>4/17</td>
</tr>
</table>
Copyright © Terry Felke-Morris http://terrymorris.net
9

10. HTML rowspan Attribute

<table border="1">
HTML rowspan Attribute
<tr>
<td rowspan="2">This spans two rows</td>
<td>Row 1 Column 2</td>
</tr>
<tr>
<td>Row 2 Column 2</td>
</tr>
</table>
Copyright © Terry Felke-Morris http://terrymorris.net
10

11. Accessibility and Tables

Use table header elements (<th> tags) to indicate column or row
headings.
Use the caption element to provide a text title or caption for the
table.
Complex tables:
Associate table cell values with their corresponding headers
◦ <th> tag id attribute
◦ <td> tag headers attribute
Copyright © Terry Felke-Morris http://terrymorris.net
11

12.

<table border="1">
<caption>Bird Sightings</caption>
<tr>
<th id="name">Name</th>
<th id="date">Date</th>
</tr>
<tr>
<td headers="name">Bobolink</td>
<td headers="date">5/25/10</td>
</tr>
<tr>
<td headers="name">Upland Sandpiper</td>
<td headers="date">6/03/10</td>
</tr>
</table>
Copyright © Terry Felke-Morris http://terrymorris.net
12

13. Checkpoint

1. Describe the purpose of using a table on a web
page.
2. How is the text contained in a th element
displayed by the browser?
3. Describe one coding technique that increases the
accessibility of an HTML table.
Copyright © Terry Felke-Morris http://terrymorris.net
13

14. Using CSS to Style a Table

HTML
Attribute
align
CSS
Property
Center align a table: table { width: 75%;
margin: auto; }
Center align within a table cell: text-align: center;
bgcolor
background-color
cellpadding
padding
cellspacing
height
border-spacing or border-collapse
height
valign
vertical-align
width
width
border
border, border-style, or border-spacing
--
background-image
Copyright © Terry Felke-Morris http://terrymorris.net
14

15. CSS Structural Pseudo-classes

Pseudo-class
Purpose
:first-of-type
Applies to the first element of the specified type
:first-child
Applies to the first child of an element (CSS2 selector)
:last-of-type
Applies to the last element of the specified type
:last-child
Applies to the last child of an element
:nth-of-type(n)
Applies to the “nth” element of the specified type
Values: a number, odd, or even
Zebra Stripe a Table
tr:nth-of-type(even) { background-color: #eaeaea; }
Copyright © Terry Felke-Morris http://terrymorris.net
15

16. Table Row Groups

<table> <caption>Time Sheet</caption>
<thead>
<tr>
<th id="day">Day</th>
<th id="hours">Hours</th>
</tr>
</thead>
<tbody>
<tr>
<td headers="day">Monday</td>
<td headers="hours">4</td>
</tr>

<tr>
<td headers="day">Friday</td>
<td headers="hours">3</td>
</tr>
</tbody>
<tfoot>
<tr>
<td headers="day">Total</td>
<td headers="hours">18</td>
</tr>
</tfoot> </table>
Copyright © Terry Felke-Morris http://terrymorris.net
Table Row
Groups
<thead>
table head rows
<tbody >
table body rows
<tfoot>
table footer rows
16

17. Checkpoint

1. Describe a reason to configure a table with CSS
properties instead of HTML attributes.
2. List three elements that are used to group table
rows.
Copyright © Terry Felke-Morris http://terrymorris.net
17

18. Summary

This chapter introduced the HTML and CSS
techniques used to create and configure
tables on web pages.
Copyright © Terry Felke-Morris http://terrymorris.net
18
English     Русский Rules
online
Categories Categories
contacts Feedback

资讯网周易风水顾问上海企业网站设计周易天地的六爻预测股市厦门网站 厦门网站制作豪门总裁的弃妇梦幻沙城破解版建设一个平台网站需要多少钱薛姓好听的男孩起名小灰灰seo农业品牌起名机械设备营销推广原版十二解梦破解平面设计网站都有那些乔丹希尔男人网名成熟稳重钢铁雄心4中文版下载c电影天堂免费八字姓名测试打分算命给餐厅起好名字周公解梦牙齿全部掉了哆啦a梦编织图解女宝起名带慈网站制作手机网站网站建设大概要多少钱起名网智慧起名何姓女婴儿起名大全周易查询愧疚自责的网名室内设计网站哪个好禅城seo少年生前被连续抽血16次?多部门介入两大学生合买彩票中奖一人不认账让美丽中国“从细节出发”淀粉肠小王子日销售额涨超10倍高中生被打伤下体休学 邯郸通报单亲妈妈陷入热恋 14岁儿子报警何赛飞追着代拍打雅江山火三名扑火人员牺牲系谣言张家界的山上“长”满了韩国人?男孩8年未见母亲被告知被遗忘中国拥有亿元资产的家庭达13.3万户19岁小伙救下5人后溺亡 多方发声315晚会后胖东来又人满为患了张立群任西安交通大学校长“重生之我在北大当嫡校长”男子被猫抓伤后确诊“猫抓病”测试车高速逃费 小米:已补缴周杰伦一审败诉网易网友洛杉矶偶遇贾玲今日春分倪萍分享减重40斤方法七年后宇文玥被薅头发捞上岸许家印被限制高消费萧美琴窜访捷克 外交部回应联合利华开始重组专访95后高颜值猪保姆胖东来员工每周单休无小长假男子被流浪猫绊倒 投喂者赔24万小米汽车超级工厂正式揭幕黑马情侣提车了西双版纳热带植物园回应蜉蝣大爆发当地回应沈阳致3死车祸车主疑毒驾恒大被罚41.75亿到底怎么缴妈妈回应孩子在校撞护栏坠楼外国人感慨凌晨的中国很安全杨倩无缘巴黎奥运校方回应护栏损坏小学生课间坠楼房客欠租失踪 房东直发愁专家建议不必谈骨泥色变王树国卸任西安交大校长 师生送别手机成瘾是影响睡眠质量重要因素国产伟哥去年销售近13亿阿根廷将发行1万与2万面值的纸币兔狲“狲大娘”因病死亡遭遇山火的松茸之乡“开封王婆”爆火:促成四五十对奥巴马现身唐宁街 黑色着装引猜测考生莫言也上北大硕士复试名单了德国打算提及普京时仅用姓名天水麻辣烫把捣辣椒大爷累坏了

资讯网 XML地图 TXT地图 虚拟主机 SEO 网站制作 网站优化