Creating a table in html

Asked

Viewed 430 times

1

I wonder if it is possible to build a table like this in html

inserir a descrição da imagem aqui

The table has no record yet, it is only two headers in which the first occupies more than one column.

  • 1

    Have a look at: http://www.w3schools.com/tags/att_td_colspan.asp

  • Thank you helped me.

3 answers

2

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

Can use a loop for iterations of values.

2

You can use the colspan. colspan server to join more than one column.

An example here.

  • Thanks but I already managed to solve the problem. But thanks anyway.

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>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.