How to create a table with HTML and CSS?

Asked

Viewed 949 times

0

Hello.

How do I create a responsive html and css table using < ul> or < table> like this:

inserir a descrição da imagem aqui

  • 2

    Start by creating the HTML structure with the elements table, tr and td. Then try stylized with CSS. If it doesn’t work out, you can [Dit] the question and add all these codes you did, explaining how it turned out and how you would like it to stay.

  • http://www.leandroguarino.com.br/index.php?p=curso_html5_css&aula=tabelas

1 answer

1


The HTML code to create this table would be as follows:

<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>

<table class="table table-responsive">
	<thead>
		<tr>
			<td width="100" rowspan="2">Resumo</td>
			<td>2</td>
			<td>3</td>
			<td>4</td>
		</tr>
		<tr>
			<td>5</td>
			<td>6</td>
			<td>7</td>			
		</tr>
	</thead>
	<tbody>
		<tr>
			<td><b>Direto</b></td>
			<td>1</td>
			<td>2</td>
			<td>3</td>
		</tr>
		<tr>
			<td><b>1 Parada</b></td>
			<td>4</td>
			<td>5</td>
			<td>6</td>
		</tr>
	</tbody>
</table>

I hope I’ve helped.

Browser other questions tagged

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