Reputation: 146
I have the following line for my table in HTML. How do I add a 10px radius to all the 4 corners?
<table id="Table_01" width="929" height="650" border="0" cellpadding="0" cellspacing="0">
As i am a newbie, I don't know what other information I must include. Please help me do this possibly by adding something like border-radius:10px to the above line. Thanks.
Upvotes: 0
Views: 153
Reputation: 8318
One of the ways where we use style tag if you cannot use external css :-
<style>
table{
border:1px solid black;
border-radius:10px;
}
</style>
<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Lak</td><td>14</td></tr>
<tr><td>Raj</td><td>17</td></tr>
<tr><td>Sheldon</td><td>15</td></tr>
<tr><td>Leonard</td><td>19</td></tr>
</table>
Upvotes: 2
Reputation: 79
If you can't write in a CSS file, then you can write it inline, like so:
<table style="border-radius: 10px;">
But keep in mind that writing styles inline is not a very good practice.
Upvotes: 1