[Tex/LaTex] Fancy tables in LaTeX

tables

I am terrible at LaTeX tables. I managed to produce a table, but it looks so basic. How do I make it fancier?

Here is the table's code:

\begin{table}
    \begin{tabular}{|l|l|l|l|l|}
         \hline
             Models    & A  & B  & C  & D  \\ \hline
             Model $X$ & X1 & X2 & X3 & X4 \\ \hline
             Model $Y$ & Y1 & Y2 & Y3 & Y4 \\
         \hline
    \end{tabular}
\end{table}

Best Answer

Besides using booktabs, you can use either colortbl or xcolor (with the option [table] to color the tables.

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{booktabs}
 \begin{document}

\begin{tabular}{*5l}    \toprule
\emph{name} & \emph{foo} &&&  \\\midrule
Models    & A  & B  & C  & D  \\ 
\rowcolor{blue!50} Model $X$ & X1 & X2 & X3 & X4\\ 
\rowcolor{green!50} Model $Y$ & Y1 & Y2 & Y3 & Y4\\\bottomrule
 \hline
\end{tabular}
\end{document}

enter image description here

Another method is somewhat automatic:

\rowcolors{<starting row>}{<first color>}{<second color>}

MWE:

\documentclass{article}
\usepackage[table]{xcolor}
\usepackage{booktabs}
 \begin{document}

\rowcolors{3}{green!25}{yellow!50}
\begin{tabular}{ *5l }    \toprule
\emph{name} & \emph{foo} &&&  \\\midrule
Models    & A  & B  & C  & D  \\ 
Model $X$ & X1 & X2 & X3 & X4\\ 
Model $Y$ & Y1 & Y2 & Y3 & Y4\\\bottomrule
 \hline
\end{tabular}
\end{document}

enter image description here

Refer to the documentation of xcolor at texdoc.net for more details.