HTML Lists
Table Structure
Table Attributes & Formatting
Advanced Table Features
Text & Page Styling
100

This tag creates an unordered list.

<ul>

100

This tag creates a table.

<table>

100

This attribute sets the width of a table.

width

100

This tag adds a title to a table.

<caption>

100

This CSS property changes text color.

color

200

This tag creates an ordered list.

<ol>

200

This tag creates a row in a table.

<tr>

200

This attribute sets the border thickness.

border

200

This attribute allows a cell to span across columns.

colspan

200

This CSS property changes font type.

font-family

300

This tag defines each item in a list.

<li>

300

This tag creates a data cell.

<td>

300

This attribute sets the background color of a table.

bgcolor

300

This attribute allows a cell to span across rows.

rowspan

300

This CSS property changes text size.

font-size

400

This type of list uses <dt> and <dd> tags.

description list

400

This tag creates a heading cell.

<th>

400

This attribute controls space inside table cells.

cellpadding

400

What is used to keep an empty cell visible?

 

400

This CSS property sets page margins.

margin

500

Write the code for an ordered list starting at number 5.

<ol start="5">
  <li>Item 1</li>
  <li>Item 2</li>
</ol>

500

What is the difference between <td> and <th>?

<td> creates normal data cells, while <th> creates bold and centered header cells.

500

Write the code to create a table with:
border=1, width=50%, align=center

<table border="1" width="50%" align="center">
</table>

500

Write a table row with 3 columns where the first cell spans 2 columns.

<tr>
  <td colspan="2">Name</td>
  <td>Score</td>
</tr>

500

Write full HTML code to:

  • Set page margin to 20px
  • Make text blue
  • Create a table with a heading row

<html>
<head>
<style>
body {
  margin: 20px;
  color: blue;
}
</style>
</head>
<body>

<table border="1">
  <tr>
    <th>Name</th>
    <th>Marks</th>
  </tr>
  <tr>
    <td>Anna</td>
    <td>90</td>
  </tr>
</table>

</body>
</html>