Hello @vinayprakash808 ,
I did not know how to do that so I checked the documentation of the xtable::xtable function but did not find a solution. Then I did a Google search on xtable html border and found a solution by tertra : using the html.table.attributes argument of the xtable::print.xtable function.
library(xtable)
print(xtable(head(iris, 2)), type = "html", include.rownames = F,
html.table.attributes="border=1;width=1000px")
#> <!-- html table generated in R 4.1.0 by xtable 1.8-4 package -->
#> <!-- Sun Jun 20 21:17:54 2021 -->
#> <table border=1;width=1000px>
#> <tr> <th> Sepal.Length </th> <th> Sepal.Width </th> <th> Petal.Length </th> <th> Petal.Width </th> <th> Species </th> </tr>
#> <tr> <td align="right"> 5.10 </td> <td align="right"> 3.50 </td> <td align="right"> 1.40 </td> <td align="right"> 0.20 </td> <td> setosa </td> </tr>
#> <tr> <td align="right"> 4.90 </td> <td align="right"> 3.00 </td> <td align="right"> 1.40 </td> <td align="right"> 0.20 </td> <td> setosa </td> </tr>
#> </table>
print(xtable(head(iris, 2)), type = "html", include.rownames = F,
html.table.attributes="border=5; width=1000px")
#> <!-- html table generated in R 4.1.0 by xtable 1.8-4 package -->
#> <!-- Sun Jun 20 21:17:54 2021 -->
#> <table border=5; width=1000px>
#> <tr> <th> Sepal.Length </th> <th> Sepal.Width </th> <th> Petal.Length </th> <th> Petal.Width </th> <th> Species </th> </tr>
#> <tr> <td align="right"> 5.10 </td> <td align="right"> 3.50 </td> <td align="right"> 1.40 </td> <td align="right"> 0.20 </td> <td> setosa </td> </tr>
#> <tr> <td align="right"> 4.90 </td> <td align="right"> 3.00 </td> <td align="right"> 1.40 </td> <td align="right"> 0.20 </td> <td> setosa </td> </tr>
#> </table>
Created on 2021-06-20 by the reprex package (v2.0.0)