How to render html tags in field collection items?
When you use Field Collection you get nested templates. So start with the outer div container in the node template:

&lt;div id="accordion" class="panel-group"&gt;
  {{ content.field_cv }}
&lt;/div&gt;


This produces a new set of templates, which you can see when you switch on Twig Debug. The next level is the field template:

field--field-cv.html.twig

{% if label_hidden %}
  {% if multiple %}
    &lt;div{{ attributes }}&gt;
      {% for item in items %}
        &lt;div{{ item.attributes }}&gt;{{ item.content }}&lt;/div&gt;
      {% endfor %}
    &lt;/div&gt;
  {% else %}
    {% for item in items %}
      &lt;div{{ attributes }}&gt;{{ item.content }}&lt;/div&gt;
    {% endfor %}
  {% endif %}
{% else %}
  &lt;div{{ attributes }}&gt;
    &lt;div{{ title_attributes }}&gt;{{ label }}&lt;/div&gt;
    {% if multiple %}
      &lt;div&gt;
    {% endif %}
    {% for item in items %}
      &lt;div{{ item.attributes }}&gt;{{ item.content }}&lt;/div&gt;
    {% endfor %}
    {% if multiple %}
      &lt;/div&gt;
    {% endif %}
  &lt;/div&gt;
{% endif %}


and inside you'll find the field collection templates:

field.collection.html.twig

{%
  set classes = [
    'field-collection-item',
    'field-collection-item--name-' ~ field_collection_item.name|clean_class,
    'field-collection-item--view-mode-' ~ field_collection_item.view_mode|clean_class,
  ]
%}
&lt;div{{ attributes.addClass(classes) }}&gt;
  &lt;div class="content"{{ content_attributes }}&gt;
    {{ content }}
  &lt;/div&gt;
&lt;/div&gt;


Which you all can use for the custom html markup.