Sommario
L'elemento HTML <br>
(o Line Break) crea un "a capo" nel testo. È utile quando è importante la divisione tra le linee, ad esempio in una poesia.
Non usare l'elemento <br>
per aumentare lo spazio tra due linee di testo, ma le proprietà CSS margin
o line-height
applicate all'elemento <p>
.
- Categoria Contenuto di flusso, contenuto testuale.
- Contenuto permesso Nessuno, è un elemento vuoto.
- Omissione dei tagDeve esserci il tag di apertura ma non ci può essere il tag di chiusura. Nei documenti XHTML, questo elemento va scritto come
<br />
. - Elementi genitore permessiQualsiasi elemento che accetta contenuto testuale.
- Interfaccia DOM
HTMLBRElement
Attributi
Questo elemento include gli attributi globali.
Esempio
Mozilla Foundation<br>
1981 Landings Drive<br>
Building K<br>
Mountain View, CA 94043-0801<br>
USA
Risultato
Mozilla Foundation
1981 Landings Drive
Building K
Mountain View, CA 94043-0801
USA
Specifiche
Specifica | Stato | Commenti |
---|---|---|
HTML Living Standard The definition of '<br>' in that specification. |
Living Standard | |
HTML5 The definition of '<br>' in that specification. |
Recommendation | |
HTML 4.01 Specification The definition of '<br>' in that specification. |
Recommendation |
Compatibilità con i browser
We're converting our compatibility data into a machine-readable JSON format.
This compatibility table still uses the old format,
because we haven't yet converted the data it contains.
Find out how you can help!
Funzionalità | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Supporto di base | 1.0 | (Yes) | (Yes) | (Yes) | (Yes) |
Funzionalità | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Supporto di base | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |
Vedi anche
- L'elemento
<p>