\documentclass{article}
\begin{document}
\begin{center}
\begin{tabular}{ | p{5cm} | p{5cm} | p{7cm} |}\hline
\centering{A} &
\centering{B} &
\centering{C} \\ \hline
\end{tabular}
\end{center}
\end{document}
I am making an A4 document and I want the words in the first row of the table to be centered. Here I have omitted other rows. But errors occur and it seems that I can't use \centering for the last column. Why doesn't it work?
\begin{tabular}{|m{2.8cm}|m{2.8cm}|m{5cm}|} \hline A & \multicolumn{1}{c|}{B} & C \\\hline A & B & I want the first two columns to have middle vertical align but the last column remains to have
top' alignment. \\\hline\end{tabular}`