I am attempting to add a caption to a non-float environment.
The following is a MWE of how I'm trying to do it:
\documentclass{article}
\usepackage{caption}
\begin{document}
\begin{tabular}{l|l}
hello & world
\captionof{table}{my table}
\end{tabular}
\end{document}
However, this is not working for me.
What am I doing wrong?