# tabular vertical borders broken

Why are the last 4 vertical lines in this table not connected to the top horizontal line?

\documentclass[]{article}
\begin{document}
\begin{tabular}{| c | c | c | c | c |}
\hline \\
15&2.5&10&7.5&5\\
\hline
\end{tabular}
\end{document}

• Do you really want an empty line as 1st line? – Sigur Dec 30 '17 at 12:48

If you want an empty line in the 1st line you have to change the columns with & before change the line:

\hline &&&&  \\


If you don't want, simply:

\hline 15 & 2.5 & 10 & 7.5 & 5 \\


MWE

\documentclass[]{article}
\begin{document}
\begin{tabular}{| c | c | c | c | c |}
\hline &&&&  \\
15&2.5&10&7.5&5\\
\hline
\end{tabular}

\medskip

\begin{tabular}{| c | c | c | c | c |}
\hline % &&&&  \\
15&2.5&10&7.5&5\\
\hline
\end{tabular}
\end{document}


Another version you are probably interested in.

Code:

\documentclass{article}
\usepackage{multirow}
\begin{document}
\begin{table}
\begin{tabular}{|l|l|l|l|l|}  \hline
\multirow{2}{*}{15} & \multirow{2}{*}{2.5} & \multirow{2}{*}{10} & \multirow{2}{*}{7.5} & \multirow{2}{*}{5} \\
&&&& \\\hline
\end{tabular}
\end{table}
\end{document}

• Nice vertical spacing! – Will A. Dec 31 '17 at 17:02