{"id":37,"date":"2023-12-21T21:17:18","date_gmt":"2023-12-21T21:17:18","guid":{"rendered":"https:\/\/yzaz.net\/html\/?page_id=37"},"modified":"2024-11-03T10:01:25","modified_gmt":"2024-11-03T10:01:25","slug":"tableaux","status":"publish","type":"page","link":"https:\/\/yzaz.net\/html\/tableaux\/","title":{"rendered":"Tableaux"},"content":{"rendered":"<p>Les tableaux sont d\u00e9crits par l&#8217;\u00e9l\u00e9ment <strong>&lt;table &gt;<\/strong>.<\/p>\n<h3>Un tableau simple<\/h3>\n<p><strong>&lt;table &gt;<\/strong> d\u00e9finit l&#8217;ensemble du tableau. \u00c0 l&#8217;int\u00e9rieur, il faut d\u00e9crire les lignes du tableau et ses cellules.<br \/>\nL&#8217;\u00e9l\u00e9ment <strong>&lt;tr&gt;<\/strong> d\u00e9crit les lignes, et <strong>&lt;td&gt;<\/strong>les cellules.<br \/>\nOn d\u00e9clare dans l&#8217;ordre <strong>&lt;table&gt;<\/strong>, puis <strong>&lt;tr&gt;<\/strong> et enfin <strong>&lt;td&gt;<\/strong>.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;table&gt; \r\n&lt;tr&gt;                          &lt;!--Nouvelle ligne du table--&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n\r\n&lt;tr&gt;                          &lt;!--Nouvelle ligne du table--&gt;\r\n&lt;td&gt;Cellule (2 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (2 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n\r\n&lt;tr&gt;                         &lt;!--Nouvelle ligne du table--&gt;\r\n&lt;td&gt;Cellule (3 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (3 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-139 aligncenter\" src=\"http:\/\/med-space.org\/youssef-zaz\/wp-content\/uploads\/2020\/11\/table1-300x113.jpg\" alt=\"\" width=\"300\" height=\"113\" \/><\/p>\n<p>Nous ajoutons une bordure et un titre pour le tableau:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!-- Ajout de bordure avec l&#039;attribut &#039;border&#039;. Le chiffre 2 correspond \u00e0 l&#039;\u00e9paisseur de la bordure --&gt;\r\n\r\n&lt;table border=&quot;2&quot;&gt;  \r\n\r\n&lt;!-- la balise caption pour ajouter le titre --&gt;\r\n\r\n&lt;caption&gt;Titre du tableau&lt;\/caption&gt;\r\n\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (2 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (2 2) &lt;\/td  &lt;\/tr&gt;\r\n\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (3 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (3 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-140 aligncenter\" src=\"http:\/\/med-space.org\/youssef-zaz\/wp-content\/uploads\/2020\/11\/table2-300x163.jpg\" alt=\"\" width=\"300\" height=\"163\" \/><\/h3>\n<h3>Tableaux \u00e9volu\u00e9s<\/h3>\n<p>Le tableau peut \u00eatre divis\u00e9 en 3 parties:<br \/>\nL&#8217;ent\u00eate du tableau: limit\u00e9 entre les balises <strong>&lt;thead&gt;<\/strong> et <strong>&lt;\/thead&gt;<\/strong><br \/>\nLe corps du tableau: limit\u00e9 entre les balises <strong>&lt;tbody&gt;<\/strong> et <strong>&lt;\/tbody&gt;<\/strong><br \/>\nLe pied du tableau: limit\u00e9 entre les balises <strong>&lt;tfoot&gt;<\/strong> et <strong>&lt;\/tfoot&gt;<\/strong><\/p>\n<p>la partie du tableau dont les cellules sont d\u00e9finies par des <\/p>\n<th>\nDans les parties: <strong>&lt;thead&gt;<\/strong> et <strong>&lt;tfoot&gt;<\/strong>, les <strong>&lt;td&gt;<\/strong> sont remplac\u00e9s par <strong>&lt;th&gt;<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;table border=&quot;1&quot;&gt;  \r\n\r\n&lt;caption&gt;Tableau \u00e9labor\u00e9&lt;\/caption&gt;\r\n\r\n&lt;thead&gt;\r\n&lt;tr&gt;\r\n&lt;th&gt;Titre col 1 &lt;\/th&gt;\r\n&lt;th&gt;Titre col 2 &lt;\/th&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/thead&gt;\r\n\r\n&lt;tbody&gt;\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (2 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (2 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (3 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (3 2) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/tbody&gt;\r\n\r\n&lt;tfoot&gt;\r\n&lt;tr&gt;\r\n&lt;th&gt;Piel 1 &lt;\/th&gt;\r\n&lt;th&gt;Pied 2 &lt;\/th&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/tfoot&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<h3><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-141 aligncenter\" src=\"http:\/\/med-space.org\/youssef-zaz\/wp-content\/uploads\/2020\/11\/table3-300x247.jpg\" alt=\"\" width=\"300\" height=\"247\" \/><\/h3>\n<h3>Fusionner des lignes ou des colonnes<\/h3>\n<p>l&#8217;attribut <strong>colspan <\/strong> pour fusionner des colonnes et l&#8217;attribut <strong>rowspan <\/strong>pour fusionner des lignes.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n\r\n&lt;table border=&quot;1&quot;&gt;  \r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (1 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (1 3) &lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n\r\n&lt;tr&gt;\r\n&lt;td&gt;            Cellule (2 1)          &lt;\/td&gt;\r\n&lt;td colspan=&quot;2&quot;&gt;Cellules (2 2) et (2 3)&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (3 1) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (3 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (3 3)&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;tr&gt;\r\n&lt;td rowspan=&quot;2&quot;&gt;Cellules (4 1) et (5 1)&lt;\/td&gt;\r\n&lt;td&gt;            Cellule  (4 2) &lt;\/td&gt;\r\n&lt;td&gt;            Cellule  (4 3)&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;tr&gt;\r\n&lt;td&gt;Cellule (5 2) &lt;\/td&gt;\r\n&lt;td&gt;Cellule (5 3)&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n\r\n&lt;\/table&gt;\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-142 size-full aligncenter\" src=\"http:\/\/med-space.org\/youssef-zaz\/wp-content\/uploads\/2020\/11\/table4.jpg\" alt=\"\" width=\"554\" height=\"218\" \/><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Les tableaux sont d\u00e9crits par l&#8217;\u00e9l\u00e9ment &lt;table &gt;. Un tableau simple &lt;table &gt; d\u00e9finit l&#8217;ensemble du tableau. \u00c0 l&#8217;int\u00e9rieur, il faut d\u00e9crire les lignes du tableau et ses cellules. L&#8217;\u00e9l\u00e9ment &lt;tr&gt; d\u00e9crit les lignes, et &lt;td&gt;les cellules. On d\u00e9clare dans l&#8217;ordre &lt;table&gt;, puis &lt;tr&gt; et enfin &lt;td&gt;. &lt;table&gt; &lt;tr&gt; &lt;!&#8211;Nouvelle ligne du table&#8211;&gt; &lt;td&gt;Cellule (1 2) &lt;\/td&gt; &lt;td&gt;Cellule (1 2)<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"_links":{"self":[{"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/pages\/37"}],"collection":[{"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":1,"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/pages\/37\/revisions"}],"predecessor-version":[{"id":38,"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/pages\/37\/revisions\/38"}],"wp:attachment":[{"href":"https:\/\/yzaz.net\/html\/wp-json\/wp\/v2\/media?parent=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}