From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- files/pt-br/web/html/element/caption/index.html | 196 ++++++++++++++++++++++++ 1 file changed, 196 insertions(+) create mode 100644 files/pt-br/web/html/element/caption/index.html (limited to 'files/pt-br/web/html/element/caption/index.html') diff --git a/files/pt-br/web/html/element/caption/index.html b/files/pt-br/web/html/element/caption/index.html new file mode 100644 index 0000000000..0100a868d4 --- /dev/null +++ b/files/pt-br/web/html/element/caption/index.html @@ -0,0 +1,196 @@ +--- +title: +slug: Web/HTML/Element/caption +tags: + - Elementos + - Tabela HTML + - Título de tabela + - título +translation_of: Web/HTML/Element/caption +--- +

Sumário

+ +

O Elemento HTML <caption> (ou Elemento HTML Subtitulo de Tabela) representa o título de uma tabela. Embora ele seja sempre o primeiro filho de um {{HTMLElement("table")}}, seu estilo, usando CSS pode colocar ele em qualquer lugar relativo a tabela.

+ +
Nota de Uso: Quando o elemento {{HTMLElement("table")}} que é o pai deste {{HTMLElement("caption")}} é o único filho de um elemento {{HTMLElement("figure")}}, use o elemento {{HTMLElement("figcaption")}} no lugar.
+ + + + + + + + + + + + + + + + + + + + + + + + +
Categoria de conteúdoNenhuma.
Conteúdo permitidoFlow content.
Omissão de tag{{no_tag_omission}}
Elementos pais permitidosUm elemento {{HTMLElement("table")}}, como seu primeiro filho.
Interface DOM{{domxref("HTMLTableCaptionElement")}}
+ +

Atributos

+ +

Este elemento inclui os atributos globais.

+ +

 

+ +

Atributos obsoletos

+ +

Os seguintes atributos são obsoletos e não devem ser usados. Estão documentados abaixo apenas como referência ao atualizar o código, e interesse histórico.

+ +

 

+ +
+
{{htmlattrdef("align")}} {{deprecatedGeneric('inline','HTML4.01')}} {{obsoleteGeneric('inline','HTML5')}}
+
Esse atributo enumerado indica como o caption deve ser alinhado em relação a tabela. Ele pode ter os seguintes valores: +
    +
  • left, exibido a esquerda da tabela
  • +
  • top, exibido antes da tabela
  • +
  • right, exibido a direita da tabela
  • +
  • bottom, exibido abaixo da tabela
  • +
+ +
Nota de uso: Não use este atributo, como ele foi depreciado: o elemento {{HTMLElement("caption")}} deve ser estilizado usando CSS. Para dar um efeito similar ao atributo align, use as propriedades CSS {{cssxref("caption-side")}} e {{cssxref("text-align")}}.
+
+
+ +

Notas de uso

+ +

Quando o elemento {{HTMLElement("table")}} que contém o <caption> é o único descendente de um elemento {{HTMLElement("figure")}}, você deve usar o {{HTMLElement("figcaption")}} elemento em vez de <caption>.

+ +

Exemplo

+ +

Esse exemplo mostra uma tabela que tem título.

+ +
<table>
+  <caption>Exemplo de título</caption>
+  <tr>
+    <th>Login</th>
+    <th>Email</th>
+  </tr>
+  <tr>
+    <td>usuario1</td>
+    <td>usuario1@dominio.com</td>
+  </tr>
+  <tr>
+    <td>usuario2</td>
+    <td>usuario2@dominio.com</td>
+  </tr>
+</table>
+ +
caption {
+  caption-side: top;
+  align: right;
+}
+table {
+  border-collapse: collapse;
+  border-spacing: 0px;
+}
+table, th, td {
+  border: 1px solid black;
+}
+ +

{{EmbedLiveSample('Exemplo', 650, 100)}}

+ +

Especificações

+ + + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificaçãoEstadoComentário
{{SpecName('HTML WHATWG', 'tables.html#the-caption-element', '<caption>')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C', 'tabular-data.html#the-caption-element', '<caption>')}}{{Spec2('HTML5 W3C')}} 
{{SpecName('HTML4.01', 'struct/tables.html#h-11.2.2', '<caption>')}}{{Spec2('HTML4.01')}} 
+ +

Compatibilidade de navegadores

+ +

{{CompatibilityTable}}

+ +
+ + + + + + + + + + + + + + + + + + + +
RecursoChromeFirefox (Gecko)Internet ExplorerOperaSafari
Suporte Básico{{CompatVersionUnknown}}{{CompatGeckoDesktop("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +
+ + + + + + + + + + + + + + + + + + + +
RecursoAndroidFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Suporte Básico{{CompatVersionUnknown}}{{CompatGeckoMobile("1.0")}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+ +

Veja também

+ + + +

{{HTMLRef}}

-- cgit v1.2.3-54-g00ecf