<br>
Resum
L'element HTML <br>
(de l'Anglès Line Break) produeix un salt de línia en el text (carriage-return). És útil per escriure un poema o una adreça, on la divisió de línies és significatiu.
No s'ha de fer servir <br>
per augmentar la distància entre línies de text; sinó la propietat CSS margin
o l'element <p>
.
- Categories de contingut Contingut de flux, phrasing content.
- Contingut permès Cap, és un empty element.
- Omissió de l'etiqueta Ha de tenir una etiqueta d'entrada, i cap de sortida. En els documents XHTML, s'ha d'escriure aquest element com a
<br />
. - Elements pares permesos Qualsevol element que accepti phrasing content.
- Interfície DOM
HTMLBRElement
Atributs
Aquest element inclou els atributs globals.
Exemple
Mozilla Foundation<br>
1981 Landings Drive<br>
Building K<br>
Mountain View, CA 94043-0801<br>
USA
L'HTML de dalt mostra:
Mozilla Foundation
1981 Landings Drive
Building K
Mountain View, CA 94043-0801
USA
Especificacions
Especificació | Estat | Comentaris |
---|---|---|
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 |
Comptabilitat amb navegadors
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!
Característica | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 1.0 | (Yes) | (Yes) | (Yes) | (Yes) |
Característica | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | (Yes) | (Yes) | (Yes) | (Yes) | (Yes) |