42 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
		
		
			
		
	
	
			42 lines
		
	
	
		
			1.0 KiB
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								title: P Align Attribute
							 | 
						||
| 
								 | 
							
								localeTitle: P Alinear atributo
							 | 
						||
| 
								 | 
							
								---
							 | 
						||
| 
								 | 
							
								## P Alinear atributo
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								### Importante
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Este atributo no es compatible con HTML5. Se recomienda utilizar la [propiedad CSS de `text-align`](https://guide.freecodecamp.org/css/text-align) .
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								Para alinear el texto dentro de una etiqueta `<p>` , este atributo ayudará.
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								### Sintaxis
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								```html
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p align="position">Lorem Ipsum...</p> 
							 | 
						||
| 
								 | 
							
								```
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								### Atributos
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								*   **izquierda** - el texto se alinea a la izquierda
							 | 
						||
| 
								 | 
							
								*   **derecha** - el texto se alinea a la derecha
							 | 
						||
| 
								 | 
							
								*   **centro** - el texto se alinea con el centro
							 | 
						||
| 
								 | 
							
								*   **justificar** - Todas las líneas de texto tienen el mismo ancho
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								### Ejemplo
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								```html
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<html> 
							 | 
						||
| 
								 | 
							
								 <body> 
							 | 
						||
| 
								 | 
							
								 <p align="center">Paragraph align attribute example</p> 
							 | 
						||
| 
								 | 
							
								 </body> 
							 | 
						||
| 
								 | 
							
								 </html> 
							 | 
						||
| 
								 | 
							
								```
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								#### Más información:
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								*   [CSS `text-align`](https://guide.freecodecamp.org/css/text-align)
							 | 
						||
| 
								 | 
							
								*   [W3 - Especificación HTML 4.01](https://www.w3.org/TR/html401/struct/text.html#h-9.3.1)
							 | 
						||
| 
								 | 
							
								*   [MDN - Alinear Texto CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
							 |