Skip to main content

Posts

Showing posts with the label HTML Tables

HTML Tables | Basic structure of an HTML table - Example of HTML table

HTML Tables: HTML tables are used to display data in rows and columns. The basic structure of an HTML table involves the use of the `<table>` element to define the table, `<tr>` (table row) elements to define rows, `<th>` (table header) elements to define header cells, and `<td>` (table data) elements to define regular cells. Here is an example of a simple HTML table: html <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8">   <meta name="viewport" content="width=device-width, initial-scale=1.0">   <title>HTML Table Example</title>   <style>     table {       width: 100%;       border-collapse: collapse;       margin-bottom: 20px;     }     th, td {       border: 1px solid #ddd;       padding: 8px;       text-align: left;     }     th {   ...