Download
    Interview Question     &Answer
Main Menu
CSS Table@ Shwetank education.com
Definition -  HTML table can be greatly improved with CSS.

Table Borders
To specify table borders in CSS, use the border property.
Example
table, th, td
{
border: 1px solid black;
}
Table Width and Height
Example
table
{ width 200%;
}
th
{ height:50px;
}
Table Text Alignment
The text-align property sets the horizontal alignment, like left, right, or center
Example
td
{ text-align:top;
}
Table Color
The example below specifies the color of the borders, and the text and background color of th elements:
Example
<html>
<head>
<style type="text/css">
table, td, th
{ border:1px solid green;
} th
{ background-color:green;
color:white; }
</style>
</head>
<body>
<table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
</tr>
<tr>
<td>Shwetank</td>
<td>Gupta</td>
</tr>
<tr>
<td>Shagun</td>
<td>sharma</td>
</tr>
</table>
</body>
</html>

Output
Try it yourself?


IT  Projects Links
M-Tech Thesis
Php Project
Java Project
Asp.Net Project
Android Project
Vb .Net Project
Html Project

------------------------------- Electronics  Project
Networking
Embedded system
Telecom
Robotics
CCNA
------------------------------- Latest IT  News


Copyright 2010-2015    shwetankeducation.com
Privacy & Terms