Change text Alignment in CSS3

Change text Alignment in CSS3

We can Change text Alignment in the horizontal positioning of blocks of text on your page using the text-align property in CSS3. We can use the technique to align paragraphs, headings, tables, and other elements. We can align text to the left or right, center the text, or create justified text. By default, most browsers align text to the left aligning text to the middle is helpful when placing titles on your with heading tags.

Change text Alignment in CSS3

Step 1: Click inside the tag declaration and type text-align: and a space.

Step 2: Type an alignment( left, right, center or justify)

Result Output

<!DOCTYPE html>
<html>
    <Head>
        <Title>Coding thai</Title>
        <style>
            h1{
                text-align: center;
            }
        </style>
    </Head>
    <body>
        <h1>Types of Web Developer</h1> 
        <hr>
        <Section class="First">
            <p> A front end developer has one general responsibility: to 
              ensure that website visitors can easily interact with the page.
                and Back-end developers are the experts who build and maintain
              the mechanisms that process data and perform actions on websites.</p>
        </Section>
        <hr>
       <small> &copy;Copyright 2022 Codingthai</small>
    </body>
</html>

Follow us on Social Media For More

FacebookInstagramPinterest

Leave a Comment