HomeToolsBlog


CSS Text Align Generator BETA

Configuration

Text Align

Class

Preview

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Code

border: 1px solid #000000;

CSS Text Align Generator

In CSS, the text-align property is used to control the horizontal alignment of text within an HTML element. It allows you to specify whether text should be aligned to the left, right, center, justified (spread across the width), or to a user's locale-specific alignment.

Here are the common values for the text-align property:

left: Text is aligned to the left side of the element.

.text-left { text-align: left; }

right: Text is aligned to the right side of the element.

.text-right { text-align: right; }

center: Text is aligned to the right side of the element.

.text-center { text-align: center; }

justify: Text is spread evenly across the width of the element, creating straight edges on both sides.

.text-justify { text-align: justify; }

start and end: These values are typically used for locale-specific text alignment, ensuring that the text is aligned to the start or end of the writing direction for the given language. For left-to-right languages, start is equivalent to left, and end is equivalent to right.

.text-start { text-align: start; }

You can apply the text-align property to various HTML elements, including paragraphs (p), headings (h1, h2), and other text-containing elements. It helps you control the horizontal alignment of text within those elements, allowing you to achieve the desired layout and formatting for your web page's content.


Top tools

Code Hub
Color PaletteNEW
Strong Password GeneratorColor PickerSocial Media Username Checker

Select Language:

© 2024 ReadyTools. All rights reserved.