Facebook Twitter Instagram
    • Sobre nosotros
    • Herramientas SEO
    • Ver mas temas
    • Más sitios que te gustarán
    Facebook Twitter Instagram Vimeo
    • Inicio
    • Secciones
      • Tutoriales
        • Aprendizaje
        • Video Tutorial
        • Manuales
        • Hagalo usted mismo
        • Electricidad
        • Electronica
        • Torrent
        • Explorar todo
      • Cursos
        • Actívate
        • Autoempleo
        • Idiomas
        • Curso De HTML
        • Javascript
        • jQuery
        • Matematicas
        • Programacion
        • Python
        • Udacity
        • Diseño Web adaptativo
      • Google
        • Google Pay
        • Adsense
        • Gmail
        • Google Apps
        • Google Chrome
        • Google Cloud Platform
        • Google Consumer Surveys
        • Google Desarrolladores
        • Google Fit
        • Google Maps
        • Google Photos
        • Google Play
        • Google Translation
        • DoubleClick
        • YouTube
        • Chromebooks
      • Marketing
        • SEM
        • SEO
        • Posicionamiento
        • Contenido
        • Publisuites
        • Space Content
        • Coobis
        • Marketing
      • Ofimática
        • Microsoft
        • Suite Ofimatica
        • Access
        • Word
        • Excel
        • Powerpoint
        • Outlook
        • Microsoft Publisher
      • Windows
        • Skype
        • Windows
        • Windows 10
        • Windows 8
        • Windows 7
        • Puerta trasera de Windows
        • Microsoft Edge
      • Ciberseguridad
        • Malware
        • Ransomware
        • Virus
        • Troyano
        • Dorkbot
        • Filecoders
        • keylogger
        • Spyware
        • Jackware
        • DDoS
        • HackerOne
        • Interpol
      • Ordenadores
        • Sistemas operativos
          • Windows
          • Mac OS
          • Android
          • Linux
          • Ubuntu
          • Kali Linux
          • Ubuntu
        • hardware
        • Software
        • BIOS
        • Unidad de disco duro
        • Programacion
        • Dispositivos
        • Internet
      • Smartphone
        • Telefonos
        • Telefonia movil y telecomunicaciones
        • Desbloquear
        • Códigos NCK
        • Liberar
        • Tarjeta SIM
        • Tablet
      • Apple
        • iPhone y iPad
        • iPhone
        • iPad
        • Mac OS
        • iCloud
        • iTunes
      • Webmasters
        • Git
        • GitHub
        • Criptografia
        • Deep Web
        • Hacker
        • FTP
        • Indexar
        • Newsletter
        • Redes y VPN
        • Herramientas online
      • Android
        • Developer Android
        • Aplicaciones
        • Android Studio
        • Android Wear
        • Desarrolladores
        • SDK Platform-Tools
        • ADB...depuración Bridge
        • Fastboot
        • Root
        • Recovery
      • Desarrollo Web
        • Sistema de gestion de contenidos
        • AMP
        • Datalife Engine
        • Blogger
        • WordPress
        • Joomla
        • Bootstrap
        • Plantillas
        • @font-face
        • Schema
        • Website
        • Desarrolladores
        • Lenguaje Web
      • Diseño Web
        • Web Responsive
        • Lenguaje Web
        • Datos estructurados
        • HTML
        • CSS3
        • JavaScript
        • Ajax
        • jQuery
        • PHP
      • Sitio Web
        • Dominios
        • Hosting
        • Servidores
        • Demo DLE
        • Modulos DLE
        • Hack
        • Optimizacion
        • Google Adsense
        • Plantillas
      • Adobe
        • After Effects
        • Dreamweaver
        • Premiere Pro CC
        • Photoshop
        • Photoshop Mix
        • Lightroom
        • Illustrator
        • Adobe Muse
        • Creative Cloud
      • Criptomonedas
        • Blockchain
        • Mineria de Criptomonedas
        • Bitcoin (BTC)
        • Bitcoin Cash (BCH)
        • DASH (Dash)
        • Dogecoin (Doge)
        • Ethereum (ETH)
        • Litecoin (LTC)
        • Monero (XMR)
        • Ripple (XRP)
        • Zcash (ZEC)
        • Forex
        • Trading
      • Ganar dinero comprando
        • CashbackDeals
        • Cashback
        • Por ir de compras
        • Aklamio
        • Intercambio de tráfico
        • Justificante de pagos
        • Webs estafas
      • Trabajos
        • Atencion al cliente
        • Asistente virtual
        • Transcripcíon
        • Transcripcíones medica
        • Entrada de datos
        • De edicion y correccion
        • Mystery Shopping
        • Micro trabajos
        • Contabilidad
        • Tutoria y aprendizaje
        • Mas ingresos extras
      • Encuestas
      • PTC
        • No pierdas tiempo...
    • Smartphone
    • Tecnología
    • Estilo de vida
    • Marketing
    • Juegos

    Tutoriales En Linea


    Tutoriales En Linea » Tutorial

    CSS Reference - Tutoriales En Linea


    Administrador Por administrador En Tutorial Noticias Herramientas online 08-06-21

    Facebook Twitter Pinterest LinkedIn Tumblr WhatsApp VKontakte Email
    Compartir
    Facebook Twitter LinkedIn Pinterest Email
    CSS Reference Property

    text-align

    See also text-align-last hanging-punctuation hyphens text-justify

    The text-align property describes how inline-level content (like text or images) inside a block level element is aligned.

    Even though the property says “text” align, it affects all elements inside the block-level element that are either inline or inline-block elements.

    The property only affects the content inside the element to which it is applied, and not the element itself. To center the element itself, the margin property can be used.

    The values of the text-align property align the content of an element with respect to the element itself, not the viewport.

    The text-align property cascades, so block-level children elements of the element to which the property is applied will also have their inline-level elements aligned the same way as their containing element.

    Trivia & Notes

    If you’re new to CSS and have a familiarity with WYSIWYG editors then it might help to know that the values of the text-align: left, center, right, and justify are equivalent to the effects applied by the text align buttons in the editor: editor usually found in the paragraph formatting section. The default is usually the left alignment in left-to-right languages, and the right alignment in right-to-left languages (such as Arabic).

    Official Syntax

    • Syntax:

      text-align: start | end | left | right | center | justify | match-parent | start end
    • Initial: a nameless value that acts as left if direction is ltr, right if direction is rtl
    • Applies To: block containers
    • Animatable: no

    Values

    start
    The same as left if direction is left-to-right and right if direction is right-to-left.
    end
    The same as right if direction is left-to-right and left if direction is right-to-left.
    left
    Inline-level content is aligned to the left edge of the line box.
    right
    Inline-level content is aligned to the right edge of the line box.

    center
    The inline contents are centered (horizontally) within the line box.
    justify

    Text is justified according to the method specified by the text-justify property.

    The browser adjusts the spacing between words so that the inline content exactly fills the entire line from the left edge of the element to its right edge.

    It usually takes the remaining space between the ends of a line’s contents and the edges of its container, and distributes that space throughout its contents so that the contents exactly fill the line box.

    inherit
    The element inherits the same alignment specified on its parent.
    match-parent
    This value behaves the same as inherit (computes to its parent’s computed value) except that an inherited start or end keyword is interpreted against its parent’s direction value and results in a computed value of either left or right.
    Start end (experimental, not supported)
    Specifies start alignment of the first line and any line immediately after a forced line break; and end alignment of any remaining lines.
    <string> (experimental, not supported)
    Instead of aligning inline content to the edges of the element, it is aligned with respect to the one-char string specified. The string is used in combination with another value specified right after it (such as start). The value specified after the one-char string specifies the alignment of content with respect to that string. For example, numeric content could be aligned with respect to the decimal point.

    Examples

    The following example centers all inline level elements inside divs that have a class of important. Any block level child elements of these divs (including inline-block elements) will also have their content centered, so you may need to reset the alignment in those.

    div.important { 
        text-align: center; 
    }
                    

    Live Demo

    View this demo on the Codrops Playground

    Browser Support

    The property works in Chrome, Firefox, Safari, Opera, IE3+, Android and iOS.

    The values start and end are not supported in Opera and IE.

    Further Reading

    • CSS Text Module Level 3

    Related Entries

    • text-align-last
    • hanging-punctuation
    • hyphens
    • text-justify

    Written by Sara Soueidan

    Last updated June 4, 2020 at 4:10 pm by Mary Lou

    Do you have a suggestion, question or want to contribute? Submit an issue.

    Compartir Facebook Twitter Pinterest Tumblr WhatsApp VKontakte

    Post Relacionados



    Publicidad
    Etiquetas
    Tutoriales En Linea ClavesTutoriales ArticulosNoticias PostTutoría Ver todas las etiquetas
    Publicidad





    Sobre nosotros

    Tutoriales En Linea

    Es un portal web de tutoriales, cursos online y de aprendizaje que pretenden simular al maestro mostrando al usuario el desarrollo de algún procedimiento o los pasos para realizar determinada actividad. Leer mas...

    Tiene una pregunta? Contactar...

    Enlaces

    • Sobre nosotros
    • Ultimos tutoriales
    • Publicar tutorial
    • Ver mas temas
    • Ultimos comentarios
    • ¿Preguntas Frecuentes?
    • Derechos de autor
    • Politica de cookies
    • DMCA
    • Nuestro equipo
    • Normas

    Herramientas online

    • Buscador de recetas
    • Prueba de diseño web
    • Codificar en binarios, hexadecimales...
    • Cual es mi IP
    • Test de velocidad
    • Editor HTML
    • Test de escritura
    • Test de nutricion
    • Descargar Videos
    • Generador de datos estructurados

    Recursos

    • Analisis de tus problemas de SEO
    • Herramientas SEO
    • Generar palabras claves
    • Referencia de CSS3
    • Convertir HTML a XML
    • Acortador de URL
    • Selector de colores
    • Contador de palabras
    • Comprimir imagenes
    • Conversor a URI de datos
    • Suscribirse
    Disponible en Google Play - Google Play y el logotipo de Google Play son marcas comerciales de Google LLC.
    Facebook Twitter Instagram Pinterest Linkedin Youtube
    • Anunciarse
    • Socios externos
    • Política de privacidad
    • Términos y Condiciones
    • Sobre nosotros
    • Contactar
    © 2023 Tutoriales En Linea. Reservados todos los derechos, queda prohibida la reproducción parcial o total sin previa autorización.

    Bloqueador de anuncios detectado

    Por favor no nos hagas esto, vivimos de esto. Si no ves la publicidad en Tutoriales en linea nos haces mucho daño.

    Deshabilite su bloqueador de anuncios y vuelva a cargar la página.