0
I can understand basic handling of <tr>
, as in the example below where we have information on each line.
<!DOCTYPE html>
<html>
<head>
<style>
table, th, td {
border: 1px solid pink;
}
</style>
</head>
<body>
<table>
<tr>
<th>Opção 1</th>
<th>Opção 2</th>
</tr>
<tr>
<td>x</td>
<td></td>
</tr>
<tr>
<td></td>
<td>x</td>
</tr>
</table>
</body>
</html>
But how can I use the <tr>
to achieve the result of the example below? Where I put two information in the same row (title and subtitle) and both in the same column?
It’s not just adding two columns?
– Marconi
@Marconi I want to leave two texts. One below the other being title and subtitle, in the same column and in the same line where you will have the other components.
– SHRIMP
You cannot tag each text
p
for example?– Ricardo Pontual
something like this (very basic only to illustrate): http://jsfiddle.net/6fpwm52s/2/
– Ricardo Pontual
@Ricardopunctual yes
– SHRIMP
The example given as an image does not appear to be tabular data. Why are you using tables?
– Woss
@Andersoncarloswoss sorry but, what would be tabular data? there is difference than approach in a table/ in a list?
– SHRIMP
@hunterxhunter These are data that belongs to a table. Tables are used to present data that have correlation so that they can be analyzed and/or compared. For example, a price list of different plans, where you present the characteristics and values of each one. A list of items is not a table. The difference is in the semantics of your page: a list would be better defined with the elements
<ul>
,<ol>
or even a set of<div>
, depending on the context.– Woss
You can draw a door on a wall and tell me it’s a door. I’ll believe it’s a door, because it looks like a door, but it’s a wall - that sums up the semantics of HTML.
– Woss
@Andersoncarloswoss his last example made me understand well, thank you. I will study more about it.
– SHRIMP