Centering Every Element in a Table on Latex

How to centering all elements in a table on laTex. I have tried \begin{center} method but it didn't work for me. Any other idea? Please help. Thanks in advance!

1 Answer

I don't know if I understood you're question correct or not, but here's an example of how to center the content inside a cell:

\documentclass{article}
\begin{document}
\begin{table}[h]
    \begin{center}
        \begin{tabular}{|c|c|}
            \hline
            Centered Text& Also Centered \\
            \hline
            Text& Also Centered \\
            \hline
        \end{tabular}
        \caption{Caption}
        \label{tab:my_label}
    \end{center}
\end{table}
\end{document}

When you're using \begin{center} and end{center} the whole environment will be centered. The c in the tabular environment specify that the content inside a cell should be centered.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Maya Lin-Takahashi

Maya Lin-Takahashi

Consumer Tech & Gadget Reviewer

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.

Share this article
Twitter Facebook Pinterest