HTML Tables

Содержание

Слайд 2

Contents

HTML Tables
Simple Tables
Complete HTML Tables
Data cells and Header cells
Nested Tables
Complex tables
Cells

Contents HTML Tables Simple Tables Complete HTML Tables Data cells and Header
Width
Cell Spacing and Padding
Column and Row Span

Слайд 3

HTML Tables

HTML Tables

Слайд 4

HTML Tables

Tables represent tabular data
A table consists of one or several rows
Each

HTML Tables Tables represent tabular data A table consists of one or
row has one or more columns
Tables comprised of several core tags:
: begin / end the table
: create a table row
: create tabular data (cell)
Tables should not be used for layout
Use CSS floats and positioning styles instead

Слайд 5

Simple HTML Tables – Example














LectureSimple HTML Tables – Example Lecture 1 Lecture 2 Lecture 2 - Demos
Lecture 2

Lecture 2 - Demos

Слайд 6

Data Cells and Header Cells
Two kinds of cells in HTML tables
Data cells

Data Cells and Header Cells Two kinds of cells in HTML tables
– containing the table data
Header cells – used for the column names or some more important cells
Why two kinds of cells?
Used to semantically separate the cells


Full Name Mark


Doncho Minkov Very good (5)


Georgi Georgiev Exellent (6)

Слайд 7

Complete HTML Tables

Table rows split into three semantic sections: header, body and

Complete HTML Tables Table rows split into three semantic sections: header, body
footer
denotes table header and contains elements, instead of elements
denotes collection of table rows that contain the very data
denotes table footer but comes BEFORE the tag
and define columns (used to set column widths)
rules=“groups”

Слайд 8

Complete HTML Table: Example










Complete HTML Table: Example Column 1 Column 2 Footer 1 Footer 2






Column 1Column 2
Footer 1Footer 2
Cell 1.1Cell 1.2
Cell 2.1Cell 2.2

header

footer

Last comes the body (data)

th

columns

Слайд 9















Column 1Column 2
Footer 1Footer 2
CellColumn 1 Column 2 Footer 1 Footer 2 Cell 1.1 Cell 1.2
1.1
Cell 1.2
Cell 2.1Cell 2.2

Complete HTML Table: Example (2)

table-full.html

Although the footer is before the data in the code, it is displayed last

Слайд 10

Nested Tables

Tables in Tables in Tables in Tables…

Nested Tables Tables in Tables in Tables in Tables…

Слайд 11

Nested Tables
Table "cells" () can contain nested tables (tables within tables):



Nested Tables Table "cells" ( ) can contain nested tables (tables within



Contact:





First Name Last Name


nested-tables.html

Слайд 12

Complex Tables

With Padding, Spacing and Stuff

Complex Tables With Padding, Spacing and Stuff

Слайд 13

cellpadding
Defines the empty space around the cell content

cellspacing
Defines the empty space between

cellpadding Defines the empty space around the cell content cellspacing Defines the
cells

Cell Spacing and Padding

Tables have two attributes related to space

Слайд 14

Cell Spacing and Padding – Example


Table Cells


Cell Spacing and Padding – Example Table Cells First Second First Second table-cells.html


First Second





FirstSecond



table-cells.html

Слайд 15

Cell Spacing and Padding – Example (2)


Table Cells

Cell Spacing and Padding – Example (2) Table Cells First Second First Second table-cells.html
cellpadding="0">


First Second





FirstSecond



table-cells.html

Слайд 16

Row and Column Spans

How to Make a Two-Cells Column or Row?

Row and Column Spans How to Make a Two-Cells Column or Row?

Слайд 17

rowspan
Defines how many rows the cell occupies

colspan
Defines how many columns the cell

rowspan Defines how many rows the cell occupies colspan Defines how many
occupies

Column and Row Span

Cells have two attributes related to merging

cell[1,1]

cell[1,2]

cell[2,1]

colspan="1"

colspan="1"

colspan="2"

cell[1,1]

cell[1,2]

cell[2,1]

rowspan="2"

rowspan="1"

rowspan="1"

Слайд 18

Column and Row Span – Example














Cell[1,1] Cell[2,1]
Cell[1,2] Cell[2,2] Cell[3,2]
Cell[1,3] Cell[2,3]

table-colspan-rowspan.html

Column and Row Span – Example Cell[1,1] Cell[2,1] Cell[1,2] Cell[2,2] Cell[3,2] Cell[1,3] Cell[2,3] table-colspan-rowspan.html

Слайд 19

Column and Row Span – Example (2)










Column and Row Span – Example (2) Cell[1,1] Cell[2,1] Cell[1,2] Cell[2,2] Cell[3,2] Cell[1,3] Cell[2,3] /tr> table-colspan-rowspan.html
class="3">

<
/tr>
Cell[1,1] Cell[2,1]
Cell[1,2] Cell[2,2] Cell[3,2]
Cell[1,3] Cell[2,3]

table-colspan-rowspan.html

Слайд 20

Homework

Create Web Pages like the following using tables:

Create a Web Page like

Homework Create Web Pages like the following using tables: Create a Web
the following using forms:
Имя файла: HTML-Tables.pptx
Количество просмотров: 37
Количество скачиваний: 0