How do I divide a row in sub rows?
Drupal 8:

$table = [
  '#type' =&gt; 'table',
  '#header' =&gt; ['ab', 'cd', 'ef'],
  [
    [
      '#plain_text' =&gt; 'rowspan',
      '#wrapper_attributes' =&gt; ['rowspan' =&gt; 2],
    ],
    ['#markup' =&gt; '1'],
    ['#markup' =&gt; '1'],
  ],
  [['#markup' =&gt; '1'], ['#markup' =&gt; '1']],
];


Result:



See Drupal Documentation for a colspan example