--- title: table.caption slug: Web/API/HTMLTableElement/caption tags: - Référence_du_DOM_Gecko translation_of: Web/API/HTMLTableElement/caption --- {{ ApiRef() }} ### Résumé **caption** renvoie la légende du tableau. ### Syntaxe string = table.caption ### Exemple if (table.caption) { // On peut alors faire quelque chose avec la légende du tableau } ### Notes Cette propriété ne renvoie rien s'il n'y a aucune légende pour le tableau. ### Spécification - [DOM Level 2 HTML : caption](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-14594520) ([traduction](http://www.yoyodesign.org/doc/w3c/dom2-html/html.html#ID-14594520)) - [Interface HTMLTableCaptionElement](http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-12035137) ([traduction](http://www.yoyodesign.org/doc/w3c/dom2-html/html.html#ID-12035137))