--- title: hifens slug: Web/CSS/hyphens translation_of: Web/CSS/hyphens original_slug: Web/CSS/hifens ---
hyphens
especifica como palavras devem ser hifenizadas quando o há quebra de texto em múltiplas linhas. Você pode prevenir a hifenização completamente, especificar pontos manualmente, ou permitir que o navegador insira automaticamente quando apropriado.hyphens: none; hyphens: manual; hyphens: auto; /* Valores globais */ hyphens: inherit; hyphens: initial; hyphens: unset;
Regras de hifenização são específicas para cada idioma. Em HTML, o idioma é determinado pelo atributo lang,
e os navegadores irão utilizar hífen apenas caso este atributo esteja presente e se houver um dicionário de hifenização disponível. Em XML, deve ser usado o atributo xml:lang.
Nota: As regras que definem como a hifenização é realizada não são explicitamente definidas pela especificação, então a hifenização exata pode variar de navegador para navegador.
{{cssinfo}}
A propriedade hyphens
é especificada como uma única palavra-chave escolhida da lista abaixo.
none
manual
auto
Nota: O comportamento da configuração auto
requer que a propriedade idioma seja indicada corretamente para que as regras de hifenização sejam selecionadas. Você deve especificar o idioma utilizando o atributo HTML lang
para garantir que a hifenização automática seja aplicada na linguagem de sua escolha.
Existem dois caracteres Unicode que podem ser utilizados para especificar manualmente potenciais pontos de quebra de linha no texto:
­
para inserir um hífen suave.Este exemplo usa três classes, uma para cada configuração possível da propriedade hyphens
.
<ul> <li><code>none</code>: sem hífen; transbordar se necessário <p lang="en" class="none">An extreme­ly long English word</p> </li> <li><code>manual</code>: hífen apenas em &hyphen; ou &shy; (se necessário) <p lang="en" class="manual">An extreme­ly long English word</p> </li> <li><code>auto</code>: hífen onde o algorítmo decidir (se necessário) <p lang="en" class="auto">An extreme­ly long English word</p> </li> </ul>
p { width: 55px; border: 1px solid black; } p.none { -webkit-hyphens: none; -ms-hyphens: none; hyphens: none; } p.manual { -webkit-hyphens: manual; -ms-hyphens: manual; hyphens: manual; } p.auto { -webkit-hyphens: auto; -ms-hyphens: auto; hyphens: auto; }
Especificação | Condição | Comentário |
---|---|---|
{{SpecName("CSS3 Text", "#hyphens-property", "hyphens")}} | {{Spec2("CSS3 Text")}} | Initial definition |
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|
Basic support | {{CompatChrome(13.0)}}{{property_prefix("-webkit")}}[1] {{CompatChrome(55.0)}} (unprefixed) |
{{CompatGeckoDesktop("6.0")}}{{property_prefix("-moz")}}[2] |
{{CompatIE("10.0")}}{{property_prefix("-ms")}}[3] | {{CompatOpera(44)}} | {{CompatSafari(5.1)}}{{property_prefix("-webkit")}} |
Hyphenation dictionary for Afrikaans (af, af-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Bulgarian (bg, bg-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Catalan (ca, ca-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Croatian (hr, hr-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | {{CompatNo}} | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Czech (cs, cs-*) | {{CompatUnknown}} | {{CompatNo}} | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Danish (da, da-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Dutch (nl, nl-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | 10.0 | {{CompatUnknown}} | 5.1 |
Hyphenation dictionary for English (en, en-*) | {{CompatChrome(55.0)}} (unprefixed) | {{CompatGeckoDesktop("6.0")}}[4] | 10.0 | {{CompatOpera(44)}} | 5.1[5] |
Hyphenation dictionary for Esperanto (eo, eo-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Estonian (et, et-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Finnish (fi, fi-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | {{CompatNo}} | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for French (fr, fr-*) | {{CompatUnknown}} | {{CompatGeckoDesktop("8.0")}} | 10.0 | {{CompatUnknown}} | 5.1 |
Hyphenation dictionary for Galician (gl, gl-*) | {{CompatUnknown}} | 9.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for German, Traditional Orthography of 1901 (de-1901, de-AT-1901, de-DE-1901) | {{CompatUnknown}} | 8.0 | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for German, Reformed Orthography of 1996 (de, de-1996, de-DE, de-AT, de-*) | {{CompatUnknown}} | 8.0 | 10.0 | {{CompatUnknown}} | 5.1 |
Hyphenation dictionary for German, Swiss Orthography (de-CH, de-CH-*) | {{CompatUnknown}} | 8.0 | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Hungarian (hu, hu-*) | {{CompatUnknown}} | 9.0 | {{CompatNo}} | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Icelandic (is, is-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Interlingua (ia, ia-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Italian (it, it-*) | {{CompatUnknown}} | 9.0 | 10.0 | {{CompatUnknown}} | 5.1 |
Hyphenation dictionary for Kurmanji (kmr, kmr-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Latin (la, la-*) | {{CompatVersionUnknown}} | 8.0 | {{CompatNo}} | {{CompatOpera(44)}} | {{CompatNo}} |
Hyphenation dictionary for Lithuanian (lt, lt-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Mongolian (mn, mn-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Norwegian (Bokmål) (no, no-*, nb, nb-*) | {{CompatUnknown}} | 8.0 | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Norwegian (Nynorsk) (nn, nn-*) | {{CompatUnknown}} | 8.0 | 10.0 | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Polish (pl, pl-*) | {{CompatUnknown}} | 31.0 | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Portuguese (pt, pt-*) | {{CompatUnknown}} | 8.0[6] | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Brazilian Portuguese (pt-BR) | {{CompatUnknown}} | 8.0[6] | 10.0 | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Russian (ru, ru-*) | {{CompatUnknown}} | 8.0 | 10.0 | {{CompatUnknown}} | 5.1 |
Hyphenation dictionary for Serbian, Bosnian, Serbo-Croatian (sh, sh-*, sr, sr-*, bs, bs-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Slovenian (sl, sl-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Spanish (es, es-*) | {{CompatUnknown}} | 8.0 | 10.0 | {{CompatUnknown}} | 5.1 |
Hyphenation dictionary for Swedish (sv, sv-*) | {{CompatUnknown}} | 8.0 | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Turkish (tr, tr-*) | {{CompatUnknown}} | 9.0 | 10.0 | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Ukrainian (uk, uk-*) | {{CompatUnknown}} | 9.0 | {{CompatNo}} | {{CompatUnknown}} | 9.1 |
Hyphenation dictionary for Upper Sorbian (hsb, hsb-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for Welsh (cy, cy-*) | {{CompatUnknown}} | 8.0 | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Hyphenation dictionary for other languages | {{CompatUnknown}} | {{CompatNo}} | {{CompatNo}} | {{CompatUnknown}} | {{CompatNo}} |
Feature | Android | Android Webview | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile | Chrome for Android |
---|---|---|---|---|---|---|---|
Basic support | {{CompatAndroid("4.0")}}{{property_prefix("-webkit")}}[1] | {{CompatChrome(55.0)}} (unprefixed) | {{CompatGeckoMobile("6.0")}}{{property_prefix("-moz")}}[2] {{CompatGeckoDesktop("43.0")}} |
{{CompatNo}} | {{CompatOperaMobile(44)}} | {{CompatSafari(4.2)}}{{property_prefix("-webkit")}} | {{CompatChrome(55.0)}} (unprefixed) |
Hyphenation dictionary for Afrikaans (af, af-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Bulgarian (bg, bg-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Catalan (ca, ca-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Croatian (hr, hr-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Czech (cs, cs-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Danish (da, da-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Dutch (nl, nl-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for English (en, en-*) | {{CompatUnknown}} | {{CompatChrome(55.0)}} (unprefixed) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOperaMobile(44)}} | {{CompatUnknown}} | {{CompatChrome(55.0)}} (unprefixed) |
Hyphenation dictionary for Esperanto (eo, eo-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Estonian (et, et-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Finnish (fi, fi-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for French (fr, fr-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Galician (gl, gl-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for German, Traditional Orthography of 1901 (de-1901, de-AT-1901, de-DE-1901) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for German, Reformed Orthography of 1996 (de, de-1996, de-DE, de-AT, de-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for German, Swiss Orthography (de-CH, de-CH-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Hungarian (hu, hu-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Icelandic (is, is-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Interlingua (ia, ia-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Italian (it, it-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Kurmanji (kmr, kmr-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Latin (la, la-*) | {{CompatUnknown}} | {{CompatVersionUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatOperaMobile(44)}} | {{CompatUnknown}} | {{CompatVersionUnknown}} |
Hyphenation dictionary for Lithuanian (lt, lt-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Mongolian (mn, mn-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Norwegian (Bokmål) (no, no-*, nb, nb-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Norwegian (Nynorsk) (nn, nn-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Polish (pl, pl-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Portuguese (pt, pt-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Brazilian Portuguese (pt-BR) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | |
Hyphenation dictionary for Russian (ru, ru-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Serbian, Bosnian, Serbo-Croatian (sh, sh-*, sr, sr-*, bs, bs-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Slovenian (sl, sl-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Spanish (es, es-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Swedish (sv, sv-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Turkish (tr, tr-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Ukrainian (uk, uk-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Upper Sorbian (hsb, hsb-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for Welsh (cy, cy-*) | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Hyphenation dictionary for other languages | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
[1] Sem hifenização automática, apenas -webkit-hyphens: none
é suportado.
[2] Hifenização automática funciona apenas para idiomas cujos dicionários de hifenização sejam integrados com Gecko. Veja a nota abaixo para ver a lista completa destas linguagens.
[3] Hifenização automática funciona apenas para idiomas cujos dicionários de hifenização sejam integrados com Internet Explorer. Veja a nota abaixo para ver a lista completa destas linguagens.
[4] Usa um dicionário en-US.
[5] en-GB e en-US usam dicionários diferentes.
[6] Usa um dicionário Português.