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/optgroup/index.html | 131 +++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 files/pt-br/web/html/element/optgroup/index.html (limited to 'files/pt-br/web/html/element/optgroup') diff --git a/files/pt-br/web/html/element/optgroup/index.html b/files/pt-br/web/html/element/optgroup/index.html new file mode 100644 index 0000000000..d202ff732b --- /dev/null +++ b/files/pt-br/web/html/element/optgroup/index.html @@ -0,0 +1,131 @@ +--- +title: +slug: Web/HTML/Element/optgroup +tags: + - Element + - Elemento + - Forms + - HTML + - HTML forms + - Reference + - Web +translation_of: Web/HTML/Element/optgroup +--- +

Sumário

+

Em um Formulário Web, o elemento HTML <optgroup> cria um agrupamento de opções dentro do elemento {{HTMLElement("select")}}.

+ +

{{Note("Elementos do tipo optgroup não podem ser aninhados.")}}

+

Atributos

+

Este elemento inclui os atributos globais.

+
+
+ {{htmlattrdef("disabled")}}
+
+ Se este atributo booleano for definido, nenhum dos itens neste optgroup poderá ser selecionado. Muitos navegadores marcam como cinza e não permitem que o elemento receba nenhum evento de navegação, como cliques do mouse ou foco.
+
+ {{htmlattrdef("label")}}
+
+ É o nome do optgroup, é o que os navegadores irão exibir como rótulo. Este atributo é obrigatório se o elemento for usado.
+
+

Exemplo

+
<select>
+  <optgroup label="Grupo 1">
+    <option>Opção 1.1</option>
+  </optgroup>
+  <optgroup label="Grupo 2">
+    <option>Opção 2.1</option>
+    <option>Opção 2.2</option>
+  </optgroup>
+  <optgroup label="Grupo 3" disabled>
+    <option>Opção 3.1</option>
+    <option>Opção 3.2</option>
+    <option>Opção 3.3</option>
+  </optgroup>
+</select>
+
+

Resultado

+

{{EmbedLiveSample("Exemplo")}}

+

Especificações

+ + + + + + + + + + + + + + + + + + + + + + + + + +
EspecificaçãoStatusComentário
{{SpecName('HTML WHATWG', 'the-button-element.html#the-optgroup-element', '<optgroup>')}}{{Spec2('HTML WHATWG')}} 
{{SpecName('HTML5 W3C', 'forms.html#the-optgroup-element', '<optgroup>')}}{{Spec2('HTML5 W3C')}} 
{{SpecName('HTML4.01', 'interact/forms.html#h-17.6', '<optgroup>')}}{{Spec2('HTML4.01')}} 
+

Compatibilidade com navegadores

+

{{CompatibilityTable}}

+
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaChromeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Suporte básico1.0{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+
+ + + + + + + + + + + + + + + + + + + +
CaracterísticaAndroidFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Suporte básico{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}{{CompatVersionUnknown}}
+
+

Veja também

+ +

{{HTMLRef}}

-- cgit v1.2.3-54-g00ecf