Check out example codes for "table css". It will help you in understanding the concepts better.

Code Example 1

   <title>Working with HTML Tables</title>
   <table>				<!-- create an table object -->
     <tr>				<!-- "tr" represents a row -->
       <th>Name</th>	<!-- use "th" to indicate header row -->
       <th>Date of Birth</th>
     <tr>				<!-- once again use tr for another row -->
       <td>Mary</td>	<!-- use "td" henceforth for normal rows -->

Code Example 2

tr , th , td  {
    border: 1px solid black;
    padding: 5%;
    text-align: center;

Code Example 3


Code Example 4

table, th, td {
  border: 1px solid black;

Code Example 5

<!-- How to create a simple table? -->
<table style="width:100%">
      <th>Title 1</th>
      <th>Title 2</th>
      <td>Line_1 Column_1</td>
      <td>Line_1 Column_2</td>
      <td>Line_2 Column_1</td>
      <td>Line_2 Column_2</td>

<!-- How to use tables to position other elements? -->
<!-- Exemple: put a paragraph in front of an image -->

<table id="begin" cellspacing="15">
			<img src="https://..." alt="some_name" height="180" width="180"/>
          	<h1>Some Header</h1>
          	<dl>Some Title</dl>
          	<p style="width: 70%;">
            text text text text text text text text text text... and more text
            <a href="https://..">a link</a>.</p>

Code Example 6

#customers td, #customers th {
  border: 1px solid #ddd;
  padding: 8px;

#customers tr:nth-child(even){background-color: #f2f2f2;}

#customers tr:hover {background-color: #ddd;}

#customers th {
  padding-top: 12px;
  padding-bottom: 12px;
  text-align: left;
  background-color: #4CAF50;
  color: white;

Learn ReactJs, React Native from