From 754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sun, 7 Apr 2024 13:41:34 -0500 Subject: new repository --- devdocs/html/element%2Fcaption.html | 116 ++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 devdocs/html/element%2Fcaption.html (limited to 'devdocs/html/element%2Fcaption.html') diff --git a/devdocs/html/element%2Fcaption.html b/devdocs/html/element%2Fcaption.html new file mode 100644 index 00000000..793768c2 --- /dev/null +++ b/devdocs/html/element%2Fcaption.html @@ -0,0 +1,116 @@ +

<caption>: The Table Caption element

The <caption> HTML element specifies the caption (or title) of a table.

+

Try it

+
+

Attributes

+

This element includes the global attributes.

+

Deprecated attributes

+
+

The following attributes are deprecated and should not be used. They are documented below for reference when updating existing code and for historical interest only.

+align Deprecated +

This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values:

left

The caption is displayed to the left of the table.

top

The caption is displayed above the table.

The caption is displayed to the right of the table.

bottom

The caption is displayed below the table.

Warning: Do not use this attribute, as it has been deprecated. The <caption> element should be styled using the CSS properties caption-side and text-align.

+
+

Usage notes

+
+

If used, the <caption> element must be the first child of its parent <table> element.

When the <table> element that contains the <caption> is the only descendant of a <figure> element, you should use the <figcaption> element instead of <caption>.

A background-color on the table will not include the caption. Add a background-color to the <caption> element as well if you want the same color to be behind both.

+
+

Example

+
+

This simple example presents a table that includes a caption.

+

html

+
<table>
+  <caption>
+    Example Caption
+  </caption>
+  <tr>
+    <th>Login</th>
+    <th>Email</th>
+  </tr>
+  <tr>
+    <td>user1</td>
+    <td>user1@sample.com</td>
+  </tr>
+  <tr>
+    <td>user2</td>
+    <td>user2@sample.com</td>
+  </tr>
+</table>
+
+
+
+ + +
+
+

Technical summary

+
Content categories None.
Permitted content +Flow content.
Tag omission The end tag can be omitted if the element is not immediately followed by ASCII whitespace or a comment.
Permitted parents A <table> element, as its first descendant.
Implicit ARIA role caption
Permitted ARIA roles No role permitted
DOM interface HTMLTableCaptionElement
+

Specifications

+
+ + +
Specification
HTML Standard
# the-caption-element
+

Browser compatibility

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariWebView AndroidChrome AndroidFirefox for AndroidOpera AndroidSafari on IOSSamsung Internet
caption1121Yes15≤44.418414≤3.21.0
align1121Yes15≤44.418414≤3.21.0
+

See also

+
+

+ © 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
+ https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption +

+
-- cgit v1.2.3