[Tex/LaTex] Reference to a table before it appears

cross-referencingfloats

I want to reference a table before it appears.The TeX code is pasted below

\documentclass{article}
\begin{document}
The results given in Table~\ref{tab:a} show the  performance of
the class.

\begin{table}
    \begin{center}
        \begin{tabular}{lrc}\hline
        Name & Mark & Grade \\
        \hline
        Prasad & 99 & A+ \\
        Prakash & 51 & C\\
        Shine & 5 & F\\ \hline
        \end{tabular}
        \caption{Class Mark List}\label{tab:a}
    \end{center}
\end{table}
\end{document}

But the text

The results given in Table~\ref{tab:a} show the  performance of
    the class.

is coming after the table. How can I put the table immediately after the text.

Best Answer

use it this way:

\begin{table}[!htb]
    \centering
        \begin{tabular}{lrc}\hline
        ....
    \caption{Class Mark List}\label{tab:a}
\end{table}

However, from typographers view the caption of a table should be above the tabular.