You are on page 1of 4

EXPERIMENT -6

ABHISHEK BABBAR
2K18/CO/018

AIM: Design an HTML page for making a table containing a different option for different
questions. (PFA)

<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<style>
{
margin: 0;
padding: 0;
font-family: 'Lato', Arial, Helvetica, sans-serif;
color: #fff;
font-size: 20px;
}

html {
height: 100vh;
}

body {
background-color: black;
height: 100%;
display: flex;
flex: 1;
justify-content: center;
align-items: center;
}

table {
border: 2px solid crimson;
padding: 10px;
}
td, th {
padding: 10px;
width : 33%;
}

tr:nth-child(even) {
background-color: springgreen;
}

tr {
background-color: cyan;
}
</style>
<title>Multiple Choices</title>
</head>

<body>
<table>
<tr>
<th>
Which is your favourite colour?
</th>
<th>
Who is your national leader?
</th>
<th>
Who has the highest test centuries in India?
</th>
</tr>
<tr>
<td>
Red
</td>
<td>
Sardar Patel
</td>
<td>
Kapil Dev
</td>
</tr>
<tr>
<td>
Yellow
</td>
<td>
Nehruji
</td>
<td>
Sachin Tendulkar
</td>
</tr>
<tr>
<td>
Blue
</td>
<td>
Indiraji
</td>
<td>
Virender Sehwag
</td>
</tr>
<tr>
<td>
Green
</td>
<td>
Narender Modi
</td>
<td>
Virat Kohli
</td>
</tr>
</table>
</body>
</html>
RESULT:-

You might also like