Qu'est-ce qu'une balise de table HTML?

An author of a web page has many options in how to display data when using Hypertext Markup Language (HTML), including an HTML table tag. The HTML table tag is used by web page writers to organize data into tables for easier viewing. Different types of data, including text, images, and even other tables, can be inserted into the table cells. A variety of different elements and attributes can be used within the HTML table tag. Une personne souhaitant saisir une table dans un document HTML devra comprendre ces différents composants et comment ils fonctionnent ensemble.

La balise de table HTML peut être utilisée pour organiser des données en colonnes et lignes. Columns are vertical lines of data and rows are horizontal lines. The HTML author can only insert data into the rows of a table because once the rows are inserted the columns will line themselves up. Some of the elements used within the HTML table tag are , , and which define the table row, table data, and table header, respectively. Attributes can be used to define the look and spacing of the rows.

If an HTML author wants a table to look just right, there are a variety of different attributes he can use to do so. Les bons attributs peuvent changer de caractéristique comme la couleur du texte, l'espacement entre les cellules, la couleur d'arrière-plan de la table et les bordures. There are even ways to get rid of borders completely so that they do not show up in the user’s browser. While an author cannot directly change the data in the columns, he can change the different characteristics of the columns. To do this, he can use elements such as and .

In order to input a table into an HTML document, the table start tag

must be used. Within the element, the author can define various attributes about the table such as the color, border, and spacing. Next, the author needs to define the table row using the element . This tells the browser that the data to follow is to be placed in a row. After this the table data—the actual information to be displayed—is inputted after the
element. It is important that the various tags are closed in sequence in order to prevent confusion in any subsequent editing.

An example of how an HTML document may look when an author wants to use the HTML table tag is as follows:









This example will produce a four celled table with two columns down and two rows across.

DANS D'AUTRES LANGUES

This is cell 1 This is cell 2
This is cell 3 This is cell 4