HTML Web development

HTML caption tag

HTML caption tag

The HTML caption element specifies a table caption.

The HTML <caption> tag has to be inserted immediately after the <table> tag.

To align and place caption you can use CSS caption-side property or CSS text-align property.


<!DOCTYPE html>
table, th, td {
        border-collapse: collapse;
        border: 1px solid black;

<caption>List of employees:</caption>
    <th>Job Title</th>
    <td>Adam White</td>
    <td>IT Coordinator</td>
    <td>Tom Brown</td>
    <td>Web Developer</td>
    <td>Matt Smith</td>
    <td>Network Administrator</td>


List of employees:
Name Job Title e-mail
Adam White IT Coordinator
Tom Brown Web Developer
Matt Smith Network Administrator

Enjoy coding!

Read also:

HTML Table

HTML Table Headers

CSS border-collapse Property