Advertisement
rootUser

(SdLab2) table create

Dec 12th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.67 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <style>
  4.             header
  5.             {
  6.                
  7.                 margin:2px;
  8.                 padding:10px;
  9.                 height:5em;
  10.                 width:80em;
  11.                 background-color:gray;
  12.                 border: 7px solid lightblue;
  13.                 color:white;
  14.                 text-align:center;
  15.             }
  16.             nav
  17.             {
  18.                 display:block;
  19.                 margin:2px;
  20.                 padding:10px;
  21.                 height:30em;
  22.                 width:5em;
  23.                 background-color:lightgray;
  24.                 border: 7px solid green;
  25.                 color:white;
  26.                 text-align:center;
  27.                 text-align:left;
  28.                 <!-- float is used to overlatp two sections -->
  29.                 float:left;
  30.             }
  31.             a:hover
  32.             {
  33.                 display:block;
  34.                 color:white;
  35.                 background-color:yellow;
  36.             }
  37.             #student td
  38.             {
  39.                 color:white;
  40.                 background-color:blue;
  41.             }
  42.             #student tr.alt td
  43.             {
  44.                 background-color:yellow;
  45.                 color:green;
  46.             }
  47.         </style>
  48.     </head>
  49.     <body>
  50.         <header>
  51.             <h1> Second Lab </h1>
  52.         </header>
  53.         <nav>
  54.             <!-- default display value : inline-->
  55.             <a href="some.html">HOME</a>
  56.             <a href="some.html">CONTACT</a>
  57.             <a href="some.html">HOME</a>
  58.         </nav>
  59.         <section>
  60.             TODAYS OBJECTIVE IS TO LEARN THE BASIC OF CSS
  61.         </section>
  62.         <table id="student">
  63.             <tr>
  64.                 <th> ID </th>
  65.                 <th> NAME </th>
  66.                 <th> CGPA </th>
  67.             </tr>
  68.             <tr>
  69.                 <th> 1 </th>
  70.                 <th> A </th>
  71.                 <th> 4 </th>
  72.             </tr>
  73.             <tr>
  74.                 <th> 1 </th>
  75.                 <th> A </th>
  76.                 <th> 4 </th>
  77.             </tr>
  78.             <tr class="alt">
  79.                 <th> 1 </th>
  80.                 <th> A </th>
  81.                 <th> 4 </th>
  82.             </tr>
  83.             <tr>
  84.                 <th> 1 </th>
  85.                 <th> A </th>
  86.                 <th> 4 </th>
  87.             </tr>          
  88.             <tr class="alt">
  89.                 <th> 1 </th>
  90.                 <th> A </th>
  91.                 <th> 4 </th>
  92.             </tr>
  93.             <tr>
  94.                 <th> 1 </th>
  95.                 <th> A </th>
  96.                 <th> 4 </th>
  97.             </tr>
  98.         </table>
  99.     </body>
  100. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement