How to remove tags from display in form? I have this form tempate

&lt;div class="a"&gt;
    {{ form.card.a }}
&lt;/div&gt;
&lt;div class="a"&gt;
    {{ form.card.b }}
&lt;/div&gt;


and I want to to frame it with  tag like this.

&lt;a href="/card?id={{ form.card.card_link }}"&gt; 
    &lt;div class="a"&gt;
        {{ form.card.a }}
    &lt;/div&gt;
    &lt;div class="a"&gt;
        {{ form.card.b }}
    &lt;/div&gt;
&lt;/a&gt;


so I made 

$form['card']['card_link'] = [
  '#type' =&gt; 'item',
  '#markup' =&gt; $this-&gt;getCardLink(), //returns integer
];


But it still doesn't show what it supposed to. 
It inserts &lt;div id="edit-card-link" class="some stuff"&gt;needed integer&lt;/div&gt; inside href="&lt;here&gt;"

How should I fix this?
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 }}