M
M
Mag1str2021-06-06 14:06:45
HTML
Mag1str, 2021-06-06 14:06:45

How to center text in a table?

I need to align the text to the center of the columns, I do not know how to do it.
60bcac2903c82816743244.png

<section class="services-area pb-120">
        <div class="container">
            <table class="table">
                <thead>
                    <tr>
                        <th scope="col">Last</th>
                        <th scope="col">Handle</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Otto</td>
                        <td>@mdo</td>
                    </tr>
                    <tr>

                        <td>Thornton</td>
                        <td>@fat</td>
                    </tr>
                    <tr>
                        <td>Larry the Bird</td>
                        <td>@twitter</td>
                    </tr>
                </tbody>
            </table>
        </div>
    </section>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DivineDraft, 2021-06-06
@Mag1str

You can simply apply cell styles (CSS)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question