xxxxxxxxxx
<table width="100%" border="0">
<tr>
<td colspan="2" bgcolor="#b5dcb3">
<h1>This is web pag main title.</h1>
</td>
</tr>
<tr valign="top">
<td bgcolor="#aaa" width="50">
<b>Main Menu</b><br>
HTML<br>
PHP<br>
Java<br>
</td>
<td bgcolor="pink" width="100" height="300">
</td>
<tr>
<td bgcolor="#d5dbc5" colspan="2" height="50">
<center>Copyright</center>
</td>
</tr>
xxxxxxxxxx
<table class="table">
<caption>List of users</caption>
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">First</th>
<th scope="col">Last</th>
<th scope="col">Handle</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Larry</td>
<td>the Bird</td>
<td>@twitter</td>
</tr>
</tbody>
</table>
xxxxxxxxxx
"""it's to get a table upto any number without linespacing trouble"""
a =int(input("upto:"))
n=a+1
for i in range(1,n):
for j in range(1,11):
print((len(str(a*a))-len(str(i*j))+1)*" ",end='')
print(i*j,end='')
print()
xxxxxxxxxx
\documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{tabularx,ragged2e,booktabs}
\begin{document}
\begin{table*}[!ht]
\caption{Evaluation results}
\centering
\setlength{\tabcolsep}{4pt}
\begin{tabularx}{\textwidth}{>{\hsize=1.9\hsize\bfseries\RaggedRight}X!{\extracolsep{\fill}}*{6}{>{\centering\arraybackslash\hsize=0.48\hsize}X}}
\toprule[1pt]\midrule[0.3pt]
\multicolumn{7}{c}{\textbf{ABC Metrics}} \\ \midrule[0.3pt]
\textbf{Algorithm}& \multicolumn{2}{c}{\textit{Algo 1}} & \multicolumn{2}{c}{\textit{Algo 2}} & \multicolumn{2}{c}{\textit{Algo 3}} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}%
{Dataset} & $D_1$ & $D_2$ & $D_1$ & $D_2$ & $D_1$ & $D_2$ \\
\addlinespace%
{Matric 1} & 0 & 0 & 0 & 0 & 0 & 0 \\
\addlinespace%
{Matric 2} & 0 & 0 & 0 & 0 & 0 & 0 \\
\addlinespace%
{Matric 3} & 0 & 0 & 0 & 0 & 0 & 0 \\
\addlinespace
{Matric 4} & 0 & 0 & 0 & 0 & 0 & 0 \\
\midrule
\multicolumn{7}{c}{\textbf{XYZ Metrics}} \\ \midrule[0.3pt]
\textbf{Algorithm}& \multicolumn{2}{c}{\textit{Algo 1}} & \multicolumn{2}{c}{\textit{Algo 2}} & \multicolumn{2}{c}{\textit{Algo 3}} \\
\cmidrule(lr){2-3} \cmidrule(lr){4-5} \cmidrule(lr){6-7}%
{Matric 5} & \multicolumn{2}{c}{0} & \multicolumn{2}{c}{0} & \multicolumn{2}{c}{0} \\ \addlinespace
{Matric 6} & \multicolumn{2}{c}{0} & \multicolumn{2}{c}{0} & \multicolumn{2}{c}{0} \\
\midrule[0.3pt]\bottomrule[1pt]
\end{tabularx}
\end{table*}
\end{document}
xxxxxxxxxx
table, th, td {
border: 1px solid black;
}
table {
border-collapse: collapse;
}