CSS 3
CSS 3
<head>
<title>css table</title>
</head>
<style>
table, th, td {
padding: 15px;
table {
width: 100%;
th {
height: 70px;
background-color: #4CAF50;
color: white;
td {
text-align: center;
</style>
<body>
<table>
<tr>
<th>name</th>
<th>roll number</th>
</tr>
<tr>
<td>ram</td>
<td>1234567</td>
</tr>
</table>
</body>
</html>
4. Use of display:
<html>
<head>
<title>display inline tag</title>
</head>
<style>
li {
display: inline;
}
</style>
<body>
<ol>
<li>mango</li>
<li>orange</li>
</body>
</html>
<head1>
<title>position </title>
</head>
<style>
div.static {
position: static;
border: 3px solid #73AD21;
}
div.relative {
position: relative;
left: 30px;
border: 3px solid #73AD21;
}
div.absolute {
position: absolute;
top: 80px;
right: 0;
width: 200px;
height: 100px;
border: 3px solid #73AD21;
}
</style>
<body>
<div class = "static">
ram is a boy
</div>
<div class = "relative">
ram is a boy
</div>
</div>
<div class = "absolute">
ram is a boy
</div>
</body>
</html>