How to remove tags from display in form?
The item element type is a form element, Drupal\Core\Render\Element\Item.

This means that it gets a form element wrapper by default.

Rather than rendering the &lt;a&gt; wrapper in the Twig template, you could include it in the render array, and add form.card.a and form.card.b as its children:

// In your form handler class

function buildForm($form, $form_state) {
  // ...

  $form['card_link'] = [
    '#type' =&gt; 'html_tag',
    '#tag' =&gt; 'a',
    '#attributes' =&gt; [
      'href' =&gt; '/card?id=' . $this-&gt;getCardLink()
    ],
  ];

  $form['card_link']['a'] = array_merge($form['card']['a'], [
    '#prefix' =&gt; '&lt;div class="a"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  ]);

  $form['card_link']['a'] = array_merge($form['card']['b'], [
    '#prefix' =&gt; '&lt;div class="a"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  ]);

  // ...
}


The template then simplifies to this:

{{ form.card_link }}