HTML/ CSS - FORMATTING INFORMATION

Asked

Viewed 53 times

-2

Hello, everybody!

I am learning HTML/CSS and would like to know how I show some information in the browser, this way using spacing between left and right information on the same line, for example:

//Left-aligned

Address

Neighborhood

Resid phone

Cell phone

//Right-aligned

Nationality

Age

Marital status


Thank you for your attention!

  • Edit the question and ask a [mcve] so we can understand what you’re trying to do.

2 answers

1

<p style="text-align:left;">
    Endereço
    <span style="float:right;">
        Nacionalidade
    </span>
</p>
<p style="text-align:left;">
    Bairro
    <span style="float:right;">
        Idade
    </span>
</p>
<p style="text-align:left;">
    Fone resid
    <span style="float:right;">
        Estado civil
    </span>
</p>
<p style="text-align:left;">
    Fone cel
</p>

0

To align a text to the left, use:

classe{
   text-align: left;
}

To align the right:

classe{
   text-align: right;
}

For the text to be justified:

classe{
   text-align: justify;
}

To center the text:

classe{
   text-align: center;
}

Browser other questions tagged

You are not signed in. Login or sign up in order to post.