With HTML you can create tables.
Examples
TablesThis example demonstrates how to create tables in an HTML document.
Table bordersThis example demonstrates different table borders.
(You can find more examples at the bottom of this page)
Tables
Tables are defined with the
More Examples
Table with no borderThis example demonstrates a table with no borders.
Headings in a tableThis example demonstrates how to display table headers.
Empty cellsThis example demonstrates how to use " " to handle cells that have no content.
Table with a captionThis example demonstrates a table with a caption.
Table cells that span more than one row/columnThis example demonstrates how to define table cells that span more than one row or one column.
Tags inside a tableThis example demonstrates how to display elements inside other elements.
Cell paddingThis example demonstrates how to use cellpadding to create more white space between the cell content and its borders.
Cell spacingThis example demonstrates how to use cellspacing to increase the distance between the cells.
Add a background color or a background image to a tableThis example demonstrates how to add a background to a table.
Add a background color or a background image to a table cellThis example demonstrates how to add a background to one or more table cells.
Align the content in a table cellThis example demonstrates how to use the "align" attribute to align the content of cells, to create a "nice-looking" table.
The frame attributeThis example demonstrates how to use the "frame" attribute to control the borders around the table.
The frame and border attributesHow to use the "frame" and "border" attributes to control the borders around the table.
Table Tags
Tag
Description
tag). The letters td stands for "table data," which is the content of a data cell. A data cell can contain text, images, lists, paragraphs, forms, horizontal rules, tables, etc.
How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 Tables and the Border Attribute If you do not specify a border attribute the table will be displayed without any borders. Sometimes this can be useful, but most of the time, you want the borders to show. To display a table with borders, you will have to use the border attribute:
Headings in a Table Headings in a table are defined with the | tag.
How it looks in a browser: Heading Another Heading row 1, cell 1 row 1, cell 2 row 2, cell 1 row 2, cell 2 Empty Cells in a Table Table cells with no content are not displayed very well in most browsers.
How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 Note that the borders around the empty table cell are missing (NB! Mozilla Firefox displays the border). To avoid this, add a non-breaking space ( ) to empty data cells, to make the borders visible:
How it looks in a browser: row 1, cell 1 row 1, cell 2 row 2, cell 1 Basic Notes - Useful Tips The |
---|
Defines a table
Defines a table row
Defines groups of table columns
Defines the attribute values for one or more columns in a table
Defines a table head
Defines a table body
Defines a table footer
Defines a table header |
---|
Defines a table cell |
0 comments:
Post a Comment