Creating a table in html

1

I would like to know if it is possible to construct a table equal to this in html

The table does not yet have any records, only two headings in which the first one occupies more than one column.

    
asked by anonymous 10.02.2015 / 10:52

3 answers

2
  • Construct the HTML table first (in the same hand).
  • Then use Jquery .append () to create it dynamically.
  • Finally put the dynamic values.

Can use a loop for iterations of values.

    
10.02.2015 / 11:00
2

You can use colspan . The colspan server to merge more than one column.

An example here.

    
10.02.2015 / 11:22
2

I did so:

<table class="table table-striped table-hover table-condensed">
     <thead>
          <tr>
               <th colspan="2"><h4>Operário</h4></th>
               <th colspan="3"><h4>Intervenção</h4></th>
               <th colspan="3"><h4>Avaria</h4></th>
               <th colspan="5"><h4>Prevista</h4></th>
          </tr>
          <tr>
               <th>Id</th>
               <th>Identidade</th>
               <th>Data</th>
               <th>Hora</th>
               <th>Duração</th>
               <th>Data</th>
               <th>Descrição</th>
               <th>Impedimento</th>
               <th>Contagem</th>
               <th>Duração</th>
               <th>Fazer</th>
               <th>Tempo</th>
               <th>Ficha</th>
          </tr>
     </thead>
     <tbody>

     </tbody>
</table>
    
10.02.2015 / 15:17