Control line spacing in CSS3

Control line spacing in CSS3

We can use the line height property to adjust the spacing or lead, between lines of text (Control line spacing in CSS3). Adjusting line spacing can make your web page text easier to read. The line spacing value can be specified as a multiple of the height of the element’s font. It can also be specified as an absolute value or a percentage carefully when applying small values because this can result in overlapping line spacing and cannot have a negative value.

Control line spacing In CSS3

Step 1: Click inside the tag declaration and line height and space.

Step 2: Type a value for the spacing

This example uses a value of 2.0 to make the spacing two times the current for height.

Result Output

<!DOCTYPE html>
<html>
    <Head>
        <Title>Coding thai</Title>
        <style>
            h1{
                text-align: center;
                text-transform: uppercase;
            }
            ol{
                line-height: 2.0;
            }
        </style>
    </Head>
    <body>
        <h1>Types of Web Developer</h1> 
        <hr>
        <ol>
            <li>Frontend Developer</li>
            <li>Back-end Developer</li>
        </ol>
        <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