Course Content
HTML Forms
HTML forms are an essential part of web development and provide a way for users to input and submit data to a server. Forms allow users to enter data such as text, numbers, checkboxes, radio buttons, and more. When a user submits a form, the data is typically sent to a server for further processing.
0/6
HTML Graphics
HTML provides various ways to incorporate graphics into web pages.
0/2
HTML Media
HTML provides built-in support for embedding and displaying various types of media content on web pages.
0/5
HTML APIs
HTML APIs, also known as browser APIs or web APIs, are a set of interfaces and methods provided by web browsers to interact with and manipulate web content, access device features, and perform various tasks. These APIs are implemented in JavaScript and are accessible to web developers when creating web applications. Here are some commonly used HTML APIs:
0/5
HTML Examples
Creating a Simple Web Page, Adding Links and Images and more
0/4
HTML5 for Free | HTML5 – Unleashing the Potential of Web Development
About Lesson

HTML tables are used to organize and display data in a structured format with rows and columns. They provide a way to present tabular data, such as data sets, pricing information, schedules, and more. Here’s an example of how to create a basic HTML table:

<table>
  <tr>
    <th>Header 1</th>
    <th>Header 2</th>
    <th>Header 3</th>
  </tr>
  <tr>
    <td>Data 1</td>
    <td>Data 2</td>
    <td>Data 3</td>
  </tr>
  <tr>
    <td>Data 4</td>
    <td>Data 5</td>
    <td>Data 6</td>
  </tr>
</table>

Let’s break down the components of the table structure:

Example

CompanyContactCountry
Alfreds FutterkisteMaria AndersGermany
Centro comercial MoctezumaFrancisco ChangMexico
Ernst HandelRoland MendelAustria
Island TradingHelen BennettUK
Laughing Bacchus WinecellarsYoshi TannamuriCanada
Magazzini Alimentari RiunitiGiovanni RovelliItaly
  • <table>: This is the container element for the entire table.
  • <tr>: This stands for table row and represents a row in the table.
  • <th>: This stands for table header cell and represents a header cell in the table. By default, header cells are bold and centered.
  • <td>: This stands for table data cell and represents a regular data cell in the table.

In the example above:

  • The first <tr> represents the header row of the table. Each <th> element defines a header cell.
  • The subsequent <tr> elements represent data rows. Each <td> element defines a data cell.

You can add more rows and columns to the table by adding more <tr>, <th>, or <td> elements as needed.

You can also customize the appearance of the table using CSS styles, such as applying borders, setting background colors, changing fonts, and more. Additionally, you can use CSS classes and IDs to target specific table cells or apply styling to different sections of the table.

HTML tables provide a flexible and powerful way to structure and present data. By using various table elements and attributes, you can create tables of different sizes and complexity to meet your specific needs.

Join the conversation