From http://www.w3schools.com (Copyright Refsnes Data)
This element defines a table caption. The <caption> tag must be inserted immediately after the <table> tag. You can specify only one caption per table. Usually the caption will be centered above the table.
The "align" attribute which was deprecated in HTML 4.01, is not supported in HTML 5. Use CSS instead.
Source | Output | ||
---|---|---|---|
<table border="1"> |
|
Attribute | Value | Description | 4 | 5 |
---|---|---|---|---|
align | left right top bottom |
How to align the caption. Not supprted. Use styles instead. | 4 |
class, contenteditable, contextmenu, dir, draggable, id, irrelevant, lang, ref, registrationmark, tabindex, template, title |
For a full description, go to Standard Attributes in HTML 5.
onabort, onbeforeunload, onblur, onchange, onclick, oncontextmenu, ondblclick, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onerror, onfocus, onkeydown, onkeypress, onkeyup, onload, onmessage, onmousedown, onmousemove, onmouseover, onmouseout, onmouseup, onmousewheel, onresize, onscroll, onselect, onsubmit, onunload |
For a full description, go to Event Attributes in HTML 5.
Table with a
caption
This example demonstrates a table with a caption.
From http://www.w3schools.com (Copyright Refsnes Data)