Indent text tag in CSS3

Indent text tag in CSS3

We can indent text in the first line in a paragraph using the text-indent property in a style rule im CSS3. This can give the paragraphs on your a more traditional look and feel. We can set the indentation as a specific measurement value or as a percentage of the overall text block width. we can create an outdent, also known as a hanging indent, by setting the text-indent property to a negative number.

Indent text

Step 1: Open the CSS file where you want to indent the text

Step 2: Click inside the tag declaration and type text-indent:? replacing? with the amount of space, you want to indent, measured in pixels(px)

Result Output

<!DOCTYPE html>
<html>
    <Head>
        <Title>Coding thai</Title>
        <style>
            p{
                font-family: arial;
                font-size: 15px;
                text-indent: 50px;
            }
        </style>
    </Head>
    <body>
        <h1>Types of Web Developer</h1> 
        <hr>
        <Section class="First">
            <p>A web developer is a programmer who develops World Wide Web applications using a
              client server model. The applications typically use HTML, CSS, and JavaScript in
              the client, and any general-purpose programming language in the server. HTTP is 
              used for communications between client and server. A front end developer has one
              general responsibility: to ensure that website visitors can easily interact with
              the page.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