Hackforge Academy

Category: html_css

HTML tables

Published on 23 Jun 2026

Explanation

HTML tables are used to display data in rows and columns. The main tags used are <table>, <tr>, <th>, and <td>.

Code:

<table border="1">
  <tr>
    <th>Name</th>
    <th>Course</th>
  </tr>
  <tr>
    <td>John</td>
    <td>Java</td>
  </tr>
</table>

Explanation

The <th> tag defines a table header cell, while the <td> tag defines a table data cell.

Code:

<table border="1">
  <tr>
    <th>ID</th>
    <th>Name</th>
  </tr>
  <tr>
    <td>101</td>
    <td>Alice</td>
  </tr>
</table>

Explanation

An unordered list (<ul>) displays items with bullet points and is commonly used for menus and item collections.

Code:

<ul>
  <li>HTML</li>
  <li>CSS</li>
  <li>JavaScript</li>
</ul>

Explanation

An ordered list (<ol>) displays items in a numbered sequence, making it useful for steps or rankings.

Code:

<ol>
  <li>Install VS Code</li>
  <li>Learn HTML</li>
  <li>Build Projects</li>
</ol>

Explanation

Lists can be nested inside other lists to represent hierarchical data structures.

Code:

<ul>
  <li>Frontend
    <ul>
      <li>HTML</li>
      <li>CSS</li>
    </ul>
  </li>
</ul>

๐Ÿš€ Learn Spring Boot with real-world projects

๐Ÿ’ก Build REST APIs step by step

๐Ÿง  Improve backend development skills

๐ŸŽฏ Get career-ready practical training

Join Our Free WhatsApp Community

Direct access to niche-specific mentors and peers on WhatsApp.

๐Ÿ

Python Community

Discuss Django, FastAPI, AI integration, and automation scripts with 15k+ developers.

Join Python Community
โš›๏ธ

React Community

Master Next.js, Framer Motion, and State Management. Share your latest UI components.

Join React Community
โ˜•

Java Community

Deep dives into Spring Boot, Microservices architecture, and high-performance backend ops.

Join Java Community