aboutsummaryrefslogtreecommitdiff
path: root/files/es/web/html/element/br/index.html
blob: 768542423bd33e5674297f108db42b6576314cd9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
---
title: <br>
slug: Web/HTML/Element/br
tags:
  - HTML
  - HTML:Elemento
  - Todas_las_Categorías
translation_of: Web/HTML/Element/br
original_slug: Web/HTML/Elemento/br
---
<h2 id="Summary" name="Summary">Resumen</h2>

<p>El elemento HTML<em> l</em><em>ine break </em><code>&lt;br&gt;</code> produce un salto de línea en el texto (retorno de carro). Es útil para escribir un poema o una dirección, donde la división de las líneas es significante.</p>

<p>No utilices <code>&lt;br&gt;</code> para incrementar el espacio entre líneas de texto; para ello utiliza la propiedad {{cssxref('margin')}} de <a href="/en-US/docs/CSS" title="CSS">CSS</a> o el elemento {{HTMLElement("p")}}.</p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row"><a href="/en-US/docs/HTML/Content_categories" title="HTML/Content_categories">Content categories</a></th>
   <td><a href="/en-US/docs/HTML/Content_categories#Flow_content" title="HTML/Content categories#Flow content">Flow content</a>, <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content categories#Phrasing content">phrasing content</a>.</td>
  </tr>
  <tr>
   <th scope="row">Contenido permitido</th>
   <td>Ninguno, es {{Glossary("empty element")}}.</td>
  </tr>
  <tr>
   <th scope="row">Omisión de etiqueta</th>
   <td>Debe tener etiqueta de inicio y no debe tener etiqueta de cierre. En documentos XHTML este elemento se escribe como <code>&lt;br /&gt;</code>.</td>
  </tr>
  <tr>
   <th scope="row">Elementos padre permitidos</th>
   <td>Cualquier elemento que acepte <a href="/en-US/docs/HTML/Content_categories#Phrasing_content" title="HTML/Content_categories#Phrasing_content">phrasing content</a>.</td>
  </tr>
  <tr>
   <th scope="row">Interfaz DOM</th>
   <td>{{domxref("HTMLBRElement")}}</td>
  </tr>
 </tbody>
</table>

<h2 id="Attributes" name="Attributes">Atributos</h2>

<p><span style="line-height: 21px;">Este elemento incluye los </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">atributos globales</a><span style="line-height: 21px;">.</span></p>

<dl>
 <dt>{{htmlattrdef("clear")}} {{deprecatedGeneric('inline','HTML4.01')}} {{obsoleteGeneric('inline','HTML5')}}</dt>
 <dd>Indica donde empieza la siguiente línea después del salto.
 <div class="note">
 <p><strong>Nota de uso: </strong>Este atributo está obsoleot en {{HTMLVersionInline(5)}} y <strong>no debe utilizarse por los autores</strong>. En su lugar utiliza la propiedad {{CSSxref('clear')}} de CSS.</p>
 </div>
 </dd>
</dl>

<h2 id="Example" name="Example">Ejemplo</h2>

<pre class="brush: html">Mozilla Foundation&lt;br&gt;
1981 Landings Drive&lt;br&gt;
Building K&lt;br&gt;
Mountain View, CA 94043-0801&lt;br&gt;
USA
</pre>

<p>El HTML de arriba muestra:</p>

<p>Mozilla Foundation<br>
 1981 Landings Drive<br>
 Building K<br>
 Mountain View, CA 94043-0801<br>
 USA</p>

<h2 id="Specifications" name="Specifications">Especificaciones</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Especificación</th>
   <th scope="col">Estado</th>
   <th scope="col">Comentario</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('HTML WHATWG', 'text-level-semantics.html#the-br-element', '&lt;br&gt;')}}</td>
   <td>{{Spec2('HTML WHATWG')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML5 W3C', 'text-level-semantics.html#the-br-element', '&lt;br&gt;')}}</td>
   <td>{{Spec2('HTML5 W3C')}}</td>
   <td> </td>
  </tr>
  <tr>
   <td>{{SpecName('HTML4.01', 'struct/text.html#h-9.3.2.1', '&lt;br&gt;')}}</td>
   <td>{{Spec2('HTML4.01')}}</td>
   <td> </td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility" name="Browser_compatibility">Compatibilidad de navegador</h2>

{{Compat("html.elements.br")}}

<h2 id="See_also" name="See_also">Ver también</h2>

<ul>
 <li>Elemento {{HTMLElement("address")}}</li>
 <li>Elemento {{HTMLElement("p")}}</li>
</ul>

<div>{{HTMLRef}}</div>