top of page

Margins

 

{
margin-top: 100px;
margin-bottom: 100px;
margin-right: 150px;
margin-left: 80px;
}

Static Position

div.static {
position: static;
border: 3px solid #73AD21;
}

Height and Width

 

div {
height: 200px;
  width: 50%;
  background-color: powderblue;
}

Full-Width table

 

<!DOCTYPE html>

<html>

<head>

<style>

table, th, td {

  border: 1px solid;

}

table {

  width: 100%;

}

</style>

</head>

<body>

<h2>Full-width Table</h2>

<table>

<tr>

   

<th>Firstname</th>

    <th>Lastname</th>

  </tr>

  <tr>

    <td>Joe</td>

    <td>Schmoe</td>

  </tr>

  <tr>

    <td>Harry</td>

    <td>Shmoe</td>

  </tr>

</table>

</body>

</html>

OUTPUT

Full-width Table1

        Firstname                         Lastname
        Joe                                     Schmoe
        Harry                                Schmoe

Aligning A Header

Output

<!DOCTYPE html>
<html>
<head>
<style>
.center {
  text-align: center;
  color: green
  ;
}
</style>
</head>
<body>

<h1 class="center">Green and center-aligned heading</h1>
<p class="center">Green and center-aligned paragraph.</p> 

</body>
</html>

bottom of page