Link to home
Start Free TrialLog in
Avatar of himanshut
himanshutFlag for Australia

asked on

Is border, a table's css property?

Hi,
Just a random question for knowledge...

based on following code, can someone tell if border="1" table's CSS property?
<table border="1" >
<tr>
 <td>
</td>
</tr>
</table>

Just curious.

Thanks
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

The border attribute of the table tag is the alternative to CSS. The CSS method is to give the table and the table cells border properties.
<table border="1">

Open in new window

is equivalent to
table, td, th { border: inset 1px #000; }

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gurvinder Pal Singh
Gurvinder Pal Singh
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
All of the old table formatting attributes have been dropped from HTML5 except border, and it only allows the values "" or "1".  It is a bad idea to use it.  CSS is the way to go for modern pages.


Cd&