I am trying to align column 1 row 1 and column 2 row 1 better (independently) (specifically the Time and seconds, x and also the height and feet, y. You can see each is off center a bit. I am unable to figure out how to center them better. Any help would be much appreciated.
\documentclass{article}
\usepackage[utf8]{inputenc}
\title{Tabular Example}
\author{nbennett }
\date{June 2022}
\begin{document}
\maketitle
\section{Table}
\begin{tabular}{|c|c|}
\hline
\vtop{\hbox{\strut Time}\hbox{\strut (seconds), (x)}}&\vtop{\hbox{\strut Height}\hbox{\strut (feet), (y)}}\
\hline
0&8 \ \hline
0.5 & 20 \ \hline
1 & 24 \ \hline
1.5 & 20 \ \hline
2 & 8 \ \hline
\hline
\end{tabular}
\end{document}


coption will automatically center each cell content. Can you post a description of what you want? Also: use of\vtopand\strut... probably not the best idea. – Miyase Jun 14 '22 at 22:08\vtopand\strutprevents it. – Miyase Jun 14 '22 at 22:11\hboxso it will not be centered within the vbox, but the vbox as a whole is centred in the column – David Carlisle Jun 14 '22 at 22:12p-type column (for example). – Miyase Jun 14 '22 at 22:13cworks wonder, no need for TeX primitives), then David Carlisle's suggestion of using two rows looks the best to me. – Miyase Jun 14 '22 at 22:21