HTML Tables
HTML Tables
Columns
Rows
Code Result
Long Tables
• There are three elements that help distinguish between the main
content of the table and the first and last rows (which can contain
different content).
• These elements help people who use screen readers and also allow
you to style these sections in a different manner than the rest of
the table (as you will see when you learn about CSS).
Tags Values
<thead> The heading of the table is placed.
*Note:- By default, browsers rarely treat the content of these elements any differently than other elements however
designers often use CSS styles to change their appearance.
Attributes of table
1. Align
• Horizontal alignment is controlled by the align attributes.
• It can be set to left, right, center, justify.
2. V-align
• It controls the vertical alignment of cell content.
• It accepts the values : top, middle or bottom
3.Width
• It sets a width of specific number of pixels of available screen
width.
Attributes of table
4.Cell padding
• It specifies the space between the cell content and its borders.
5.Cell spacing
• It controls the spacing between adjacent cells.
6.Border
• It controls the border to be placed around the table.
Attributes of table
7.Colspan
• Sometimes we may need the entries in a table to stretch across
more than one column.