How to dix a broken/damaged HTML Code?

Topic summary

A user encountered an HTML tag error in their Shopify theme’s header section code. The code snippet shows significant corruption, with portions appearing reversed or garbled (text written backwards), making it difficult to identify the exact issue.

Key Problems Identified:

  • Malformed Liquid template syntax with reversed text segments
  • Potential null reference errors in JavaScript (accessing dropdownElement.offsetHeight without null checks)
  • Missing closing tags for <ul> and <div> elements in dropdown menus
  • Improperly structured conditional blocks in the header navigation and logo rendering sections

Recommended Fixes:

  • Add null checks before accessing DOM elements in JavaScript
  • Ensure all opening tags have corresponding closing tags
  • Validate menu existence before rendering: {%- if section.settings.menu != blank -%}
  • Review and correct the reversed/corrupted text portions

One responder emphasized the importance of providing specific error messages and using proper code formatting when seeking help, noting that vague problem descriptions hinder effective troubleshooting.

Summarized with AI on November 4. AI used: claude-sonnet-4-5-20250929.

Hello,

I got an error message saying I need to fix a damaged HTML-tag. How can I fix this??

{{- ‘section-header.css’ | asset_url | stylesheet_tag -}}

{% liquid
assign header_nav = blank
assign header_classes = section.settings.layout | prepend: ’ ’

if template.name == ‘index’ and section.settings.transparent_header_homepage
assign header_classes = header_classes | append: ’ is-transparent ’
elsif template.name == ‘collection’ and section.settings.transparent_header_collection
assign header_classes = header_classes | append: ’ is-transparent ’
endif

assign header_classes = header_classes | append: ’ ’ | append: section.settings.color_scheme_background | append: ’ ’ | append: section.settings.color_scheme_text

assign transparent_header = false
if section.settings.transparent_header_homepage and template.name == ‘index’
assign transparent_header = true
endif
if section.settings.transparent_header_collection and template.name == ‘collection’
assign transparent_header = true
endif
%}
{%- if transparent_header -%}

{% liquid
if section.settings.transparent_header_bottom_border
assign header_inner_after_opacity = ‘0.2’
else
assign header_inner_after_opacity = ‘0’
endif
%}

{% style %}
.hero-banner .hero__media.media–overlay:before,
.collection-hero .media–overlay:before {
content: ‘’;
position: absolute;
inset-block-start: 0;
inset-inline-start: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 100%);
pointer-events: none;
z-index: 2;
}
.section-{{ section.id }} {
–header-inner-after-opacity: {{ header_inner_after_opacity }};
}
{% endstyle %}
{%- endif -%}

{%- if section.settings.sticky -%}
{% assign header_classes = header_classes | append: ’ is-sticky’ %}

{% style %}
:root {
–collection-sidebar-block-start: var(–header-height, 5.6rem);
}
@media screen and (min-width: 750px) {
:root {
–collection-sidebar-block-start: var(–header-height, 7.4rem);
}
}

html.no-js .collection__sidebar {
–collection-sidebar-block-start: 8rem;
}

#shopify-section-{{- section.id -}} {
position: -webkit-sticky;
position: sticky;
inset-block-start: 0;
z-index: var(–z-header);
max-height: var(–header-height, 0);
}

{% unless transparent_header %}
.collection-hero.has-desktop-image.banner–full .collection-hero__breadcrumbs:before {
content: ‘’;
position: absolute;
inset-block-start: 0;
inset-inline-start: 0;
width: 100%;
height: 100%;
background-image: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0) 100%);
}
{% endunless %}
{% endstyle %}
{%- endif -%}
{%- if section.settings.transparent_header_collection -%}
{% style %}
@media screen and (min-width: 750px) {
.collection-hero.has-desktop-image .collection-hero__breadcrumbs {
inset-block-start: var(–header-height, 7.4rem) !important;
}
}
{% endstyle %}
{%- endif -%}

{%- if linklists[section.settings.menu].links.size > 0 -%} {%- render 'navigation-drawer', menu: linklists[section.settings.menu], submenu: linklists[section.settings.submenu], section: section, append_id: 'header' -%}

{%- capture header_nav -%}

    {%- for link in linklists[section.settings.menu].links -%} {%- assign link_handle = link.title | handleize -%} {%- assign menu_dropdown_items_size = 0 -%}

    {% liquid
    assign count_of_images = 0
    for block in section.blocks
    assign block_link_handle = block.settings.menu_link_title | handleize

    if link_handle != block_link_handle
    continue
    endif

    if block.settings.image != blank or block.settings.card_title != blank
    assign count_of_images = count_of_images | plus: 1
    endif
    endfor
    %}

    {%- capture menu_dropdown_items -%}
    {%- assign menu_remained_size = section.settings.menu_column_count | minus: link.links.size -%}

    {%- for block in section.blocks -%}

    {%- assign block_link_handle = block.settings.menu_link_title | handleize -%}

    {%- if link_handle != block_link_handle -%}
    {%- continue -%}
    {%- endif -%}

    {%- assign menu_dropdown_items_size = menu_dropdown_items_size | plus: 1 -%}

    {%- if menu_remained_size == 0 -%}
    {%- break -%}
    {%- endif -%}
    {%- assign menu_remained_size = menu_remained_size | minus: 1 -%}

    {%- case block.type -%}
    {%- when ‘image-link-text’ -%}

    {%- if block.settings.image != blank -%}

    {%- endif -%}

    {%- when ‘menu-promo-card’ -%}

    {%- if block.settings.card_title != blank -%}
    {%- assign card_text_classes = block.settings.color_scheme_text | append: ’ ’ | append: block.settings.color_scheme_background | append: ’ collection__card-text js-card-text’ -%}

    {% render 'card-text', class: card_text_classes, title: block.settings.card_title, button_text: block.settings.card_button_text, button_url: block.settings.card_button_url, button_style: block.settings.card_button_style %}
    {%- endif -%}

    {%- endcase -%}

    {%- endfor -%}
    {%- endcapture -%}

    {%- liquid
    assign link_item_additional_classes = blank
    assign has_dropdown = false
    assign default_dropdown = false
    assign all_child_links_empty = true

    for child_link in link.links
    if child_link.links.size > 0
    assign all_child_links_empty = false
    endif
    endfor

    if link.links.size > 0 or menu_dropdown_items_size > 0
    assign link_item_additional_classes = ’ has-dropdown’
    assign has_dropdown = true

    if link.links.size > 0 and menu_dropdown_items_size == 0
    assign default_dropdown = true
    assign link_item_additional_classes = link_item_additional_classes | append: ’ default-dropdown’
    if all_child_links_empty
    assign link_item_no_child_class = ’ no-child’
    endif
    endif
    endif
    -%}

  • {{- link.title | escape -}}

    {%- if has_dropdown -%}

    {% liquid
    assign size_of_columns = section.settings.menu_column_count
    assign size_of_links = link.links.size
    assign size_of_images = count_of_images
    assign size_of_grid = size_of_links | plus: size_of_images

    assign filler_lower_limit = 1
    assign filler_upper_limit = size_of_columns | minus: size_of_grid
    if filler_upper_limit < 0
    assign filler_upper_limit = 0
    endif
    %}

      {%- for child_link in link.links -%} {% if child_link.links.size == 0%} {% style %} .card.header__card:empty { display: none; } {% endstyle %} {% endif %}
    • {{- child_link.title | escape -}}

      {%- if child_link.links.size > 0 -%}

      {%- endif -%}
    • {%- endfor -%}

      {%- if filler_upper_limit > 0 -%}
      {% for i in (filler_lower_limit..filler_upper_limit) -%}

      {%- endfor -%} {%- endif -%}

      {%- if menu_dropdown_items_size > 0 -%}
      {{ menu_dropdown_items }}
      {%- endif -%}

    {%- endif -%}
  • {%- endfor -%}

    @@additional_links_placeholder@@

{%- endcapture -%} {%- endif -%}

{%- capture header_logo -%}

{%- liquid
assign header_logo_text_class = ‘’
if section.settings.logo_svg_code == blank and section.settings.logo == blank
assign header_logo_text_class = ‘header__logo-text’
endif
-%}

{%- if section.settings.logo_svg_code != blank -%} {{- section.settings.logo_svg_code -}} {%- elsif section.settings.logo != blank -%} {% liquid assign logo_image_size_double = section.settings.logo_width | times: 2 | at_most: 5760 capture logo_srcset assign logo_srcset = section.settings.logo | image_url: width: section.settings.logo_width assign logo_srcset_double = section.settings.logo | image_url: width: logo_image_size_double echo logo_srcset | append: ' 1x' | append: ', ' | append: logo_srcset_double | append: ' 2x' endcapture assign logo_alt = section.settings.logo.alt | default: shop.name | escape %}

{{ section.settings.logo
| image_url: width: section.settings.logo_width
| image_tag:
class: ‘header__logo-image new’,
width: section.settings.logo.width,
height: section.settings.logo.height,
srcset: logo_srcset,
alt: logo_alt,
preload: true
}}

{% liquid
assign logo_transparent_image_size_double = section.settings.logo_width | times: 2 | at_most: 5760

if section.settings.logo_transparent
assign logo_transparent_image = section.settings.logo_transparent
else
assign logo_transparent_image = section.settings.logo
endif

capture logo_transparent_srcset
assign logo_srcset = logo_transparent_image | image_url: width: section.settings.logo_width
assign logo_srcset_double = logo_transparent_image | image_url: width: logo_transparent_image_size_double
echo logo_srcset | append: ’ 1x’ | append: ‘, ’ | append: logo_srcset_double | append: ’ 2x’
endcapture
assign logo_transparent_alt = logo_transparent_image.alt | default: shop.name | escape
%}

{{ logo_transparent_image
| image_url: width: section.settings.logo_width
| image_tag:
class: ‘header__logo-image-transparent new’,
width: section.settings.logo.width,
height: section.settings.logo.height,
srcset: logo_transparent_srcset,
alt: logo_transparent_alt,
preload: true
}}

{%- else -%}
{{- shop.name | escape -}}
{%- endif -%}

{%- endcapture -%}

{%- capture header_utils -%}

{%- endcapture -%}

{%- capture header_additional_links -%}
{%- if section.settings.country_drawer_header -%}

  • {%- render 'country-drawer', button_class: ' header__@@type@@-link nav-text-link', section: section, append_id: 'header' -%}
  • {%- endif -%}

    {%- if section.settings.first_additional_link_title != blank and section.settings.first_additional_link_url != blank -%}

  • {{- section.settings.first_additional_link_title -}}
  • {%- endif -%}

    {%- if section.settings.second_additional_link_title != blank and section.settings.second_additional_link_url != blank -%}

  • {{- section.settings.second_additional_link_title -}}
  • {%- endif -%} {%- endcapture -%}

    {%- liquid
    assign header_additional_links_nav = header_additional_links | replace: ‘@@type@@’, ‘nav’
    assign header_additional_links_utils = header_additional_links | replace: ‘@@type@@’, ‘utils’

    assign header_nav_additional_links = header_nav | replace_first: ‘@@additional_links_placeholder@@’, header_additional_links_nav
    assign header_utils_additional_links = header_utils | replace_first: ‘@@additional_links_placeholder@@’, header_additional_links_utils

    assign header_nav = header_nav | remove_first: ‘@@additional_links_placeholder@@’
    assign header_utils = header_utils | remove_first: ‘@@additional_links_placeholder@@’
    -%}

    {%- case section.settings.layout -%}
    {%- when ‘header–nav-centered’ -%}
    {{ header_logo }}

    {{ header_nav_additional_links }}

    {{ header_utils }}
    {%- when ‘header–logo-centered-nav-centered-below’ -%}
    {{ header_utils }}

    {{ header_logo }}

    {{ header_nav_additional_links }}
    {%- when ‘header–nav-centered-below’ -%}
    {{ header_logo }}

    {{ header_utils }}

    {{ header_nav_additional_links }}
    {%- when ‘header–nav-logo-left’ -%}
    {{ header_logo }}

    {{ header_nav }}

    {{ header_utils_additional_links }}
    {%- when ‘header–nav-drawer’ -%}
    {{ header_nav }}

    {{ header_logo }}

    {{ header_utils }}
    {%- else -%}
    {{ header_nav }}

    {{ header_logo }}

    {{ header_utils_additional_links }}
    {%- endcase -%}

    {% style %}
    .header__logo {
    width: {{ section.settings.logo_width_mobile | divided_by: 10.0 }}rem;
    }
    .header__logo.header__logo-text .h4 {
    font-size: calc(var(–font-heading-scale) * 1.6rem * {{ section.settings.logo_font_size }});
    }
    @media screen and (min-width: 750px) {
    .header__logo {
    width: {{ section.settings.logo_width | divided_by: 10.0 }}rem;
    }
    .header__logo.header__logo-text .h4 {
    font-size: calc(var(–font-heading-scale) * 1.8rem * {{ section.settings.logo_font_size }});
    }
    }
    {% endstyle %}

    {%- if request.page_type == ‘index’ -%}
    {% assign potential_action_target = request.origin | append: routes.search_url | append: “?q={search_term_string}” %}

    {%- endif -%}

    {% schema %}
    {
    “name”: “t:sections.header.name”,
    “class”: “section–header”,
    “settings”: [
    {
    “type”: “header”,
    “content”: “t:sections.header.settings.header_general.content”
    },
    {
    “type”: “checkbox”,
    “id”: “fullwidth”,
    “label”: “t:sections.header.settings.fullwidth.label”,
    “default”: true
    },
    {
    “type”: “checkbox”,
    “id”: “sticky”,
    “label”: “t:sections.header.settings.sticky.label”,
    “default”: true
    },
    {
    “type”: “select”,
    “id”: “color_scheme_background”,
    “label”: “t:sections.global.settings.color_scheme_background.label”,
    “options”: [
    {
    “value”: “background-colors-default”,
    “label”: “t:sections.global.settings.color_scheme_background.options.default.label”
    },
    {
    “value”: “background-colors-secondary”,
    “label”: “t:sections.global.settings.color_scheme_background.options.secondary.label”
    },
    {
    “value”: “background-colors-accent-1”,
    “label”: “t:sections.global.settings.color_scheme_background.options.accent_one.label”
    },
    {
    “value”: “background-colors-accent-2”,
    “label”: “t:sections.global.settings.color_scheme_background.options.accent_two.label”
    },
    {
    “value”: “background-colors-inverse”,
    “label”: “t:sections.global.settings.color_scheme_background.options.inverse.label”
    }
    ],
    “default”: “background-colors-default”
    },
    {
    “type”: “select”,
    “id”: “color_scheme_text”,
    “label”: “t:sections.global.settings.color_scheme_text.label”,
    “options”: [
    {
    “value”: “text-colors-default”,
    “label”: “t:sections.global.settings.color_scheme_text.options.default.label”
    },
    {
    “value”: “text-colors-secondary”,
    “label”: “t:sections.global.settings.color_scheme_text.options.secondary.label”
    },
    {
    “value”: “text-colors-inverse”,
    “label”: “t:sections.global.settings.color_scheme_text.options.inverse.label”
    }
    ],
    “default”: “text-colors-default”
    },
    {
    “type”: “select”,
    “id”: “layout”,
    “label”: “t:sections.header.settings.layout.label”,
    “options”: [
    {
    “value”: “”,
    “label”: “t:sections.header.settings.layout.options.default.label”
    },
    {
    “value”: “header–nav-centered”,
    “label”: “t:sections.header.settings.layout.options.nav_centered.label”
    },
    {
    “value”: “header–logo-centered-nav-centered-below”,
    “label”: “t:sections.header.settings.layout.options.logo_centered_nav_centered_below.label”
    },
    {
    “value”: “header–nav-centered-below”,
    “label”: “t:sections.header.settings.layout.options.nav_centered_below.label”
    },
    {
    “value”: “header–nav-logo-left”,
    “label”: “t:sections.header.settings.layout.options.nav_logo_left.label”
    },
    {
    “value”: “header–nav-drawer”,
    “label”: “t:sections.header.settings.layout.options.nav_drawer.label”
    }
    ]
    },
    {
    “type”: “checkbox”,
    “id”: “transparent_header_homepage”,
    “label”: “t:sections.header.settings.transparent_header_homepage.label”,
    “info”: “t:sections.header.settings.transparent_header_homepage.info”,
    “default”: true
    },
    {
    “type”: “checkbox”,
    “id”: “transparent_header_collection”,
    “label”: “t:sections.header.settings.transparent_header_collection.label”,
    “info”: “t:sections.header.settings.transparent_header_collection.info”,
    “default”: true
    },
    {
    “type”: “checkbox”,
    “id”: “transparent_header_bottom_border”,
    “label”: “t:sections.header.settings.transparent_header_bottom_border.label”,
    “info”: “t:sections.header.settings.transparent_header_bottom_border.info”,
    “default”: true
    },
    {
    “type”: “checkbox”,
    “id”: “drawer_layer”,
    “label”: “t:sections.header.settings.drawer_layer.label”,
    “info”: “t:sections.header.settings.drawer_layer.info”,
    “default”: true
    },
    {
    “type”: “header”,
    “content”: “t:sections.header.settings.header_logo.content”
    },
    {
    “type”: “image_picker”,
    “id”: “logo”,
    “label”: “t:sections.header.settings.logo.label”
    },
    {
    “type”: “image_picker”,
    “id”: “logo_transparent”,
    “label”: “t:sections.header.settings.transparent_logo.label”,
    “info”: “t:sections.header.settings.transparent_logo.info”
    },
    {
    “type”: “html”,
    “id”: “logo_svg_code”,
    “label”: “t:sections.header.settings.logo_svg_code.label”,
    “info”: “t:sections.header.settings.logo_svg_code.info”
    },
    {
    “type”: “range”,
    “id”: “logo_width”,
    “min”: 50,
    “max”: 200,
    “step”: 2,
    “unit”: “px”,
    “label”: “t:sections.header.settings.logo_width.label”,
    “info”: “t:sections.header.settings.logo_width.info”,
    “default”: 120
    },
    {
    “type”: “range”,
    “id”: “logo_width_mobile”,
    “min”: 40,
    “max”: 160,
    “step”: 2,
    “unit”: “px”,
    “label”: “t:sections.header.settings.logo_width_mobile.label”,
    “info”: “t:sections.header.settings.logo_width_mobile.info”,
    “default”: 80
    },
    {
    “type”: “range”,
    “id”: “logo_font_size”,
    “min”: 0.5,
    “max”: 4.0,
    “step”: 0.5,
    “label”: “t:sections.header.settings.logo_font_size.label”,
    “info”: “t:sections.header.settings.logo_font_size.info”,
    “unit”: “x”,
    “default”: 1.0
    },
    {
    “type”: “header”,
    “content”: “t:sections.header.settings.header_navigation.content”
    },
    {
    “type”: “link_list”,
    “id”: “menu”,
    “label”: “t:sections.header.settings.menu.label”,
    “default”: “main-menu”
    },
    {
    “type”: “link_list”,
    “id”: “submenu”,
    “label”: “t:sections.header.settings.submenu.label”,
    “info”: “t:sections.header.settings.submenu.info”,
    “default”: “main-menu”
    },
    {
    “type”: “range”,
    “id”: “menu_column_count”,
    “min”: 1,
    “max”: 6,
    “step”: 1,
    “label”: “t:sections.header.settings.menu_column_count.label”,
    “info”: “t:sections.header.settings.menu_column_count.info”,
    “default”: 5
    },
    {
    “type”: “header”,
    “content”: “t:sections.header.settings.header_country_drawer.content”
    },
    {
    “type”: “checkbox”,
    “id”: “country_drawer_header”,
    “label”: “t:sections.header.settings.country_drawer_header.label”,
    “info”: “t:sections.header.settings.country_drawer_header.info”,
    “default”: true
    },
    {
    “type”: “checkbox”,
    “id”: “country_drawer_navigation_menu”,
    “label”: “t:sections.header.settings.country_drawer_navigation_menu.label”,
    “info”: “t:sections.header.settings.country_drawer_navigation_menu.info”,
    “default”: true
    },
    {
    “type”: “header”,
    “content”: “t:sections.header.settings.header_first_additional_link.content”,
    “info”: “t:sections.header.settings.header_first_additional_link.info”
    },
    {
    “type”: “text”,
    “id”: “first_additional_link_title”,
    “label”: “t:sections.header.settings.first_additional_link_title.label”,
    “default”: “Collections”
    },
    {
    “type”: “url”,
    “id”: “first_additional_link_url”,
    “label”: “t:sections.header.settings.first_additional_link_url.label”,
    “default”: “/collections”
    },
    {
    “type”: “header”,
    “content”: “t:sections.header.settings.header_second_additional_link.content”,
    “info”: “t:sections.header.settings.header_second_additional_link.info”
    },
    {
    “type”: “text”,
    “id”: “second_additional_link_title”,
    “label”: “t:sections.header.settings.second_additional_link_title.label”,
    “default”: “Products”
    },
    {
    “type”: “url”,
    “id”: “second_additional_link_url”,
    “label”: “t:sections.header.settings.second_additional_link_url.label”,
    “default”: “/collections/all”
    }
    ],
    “blocks”: [
    {
    “type”: “image-link-text”,
    “name”: “t:sections.header.blocks.image-link-text.name”,
    “settings”: [
    {
    “type”: “text”,
    “id”: “menu_link_title”,
    “label”: “t:sections.header.blocks.image-link-text.settings.menu_link_title.label”,
    “info”: “t:sections.header.blocks.image-link-text.settings.menu_link_title.info”
    },
    {
    “type”: “image_picker”,
    “id”: “image”,
    “label”: “t:sections.header.blocks.image-link-text.settings.image.label”
    },
    {
    “type”: “url”,
    “id”: “url”,
    “label”: “t:sections.header.blocks.image-link-text.settings.url.label”
    },
    {
    “type”: “text”,
    “id”: “title”,
    “label”: “t:sections.header.blocks.image-link-text.settings.title.label”
    }
    ]
    },
    {
    “type”: “menu-promo-card”,
    “name”: “t:sections.header.blocks.menu-promo-card.name”,
    “settings”: [
    {
    “type”: “text”,
    “id”: “menu_link_title”,
    “label”: “t:sections.header.blocks.image-link-text.settings.menu_link_title.label”,
    “info”: “t:sections.header.blocks.image-link-text.settings.menu_link_title.info”
    },
    {
    “type”: “select”,
    “id”: “color_scheme_text”,
    “label”: “t:sections.global.settings.color_scheme_text.label”,
    “options”: [
    {
    “value”: “color-text-primary”,
    “label”: “t:sections.global.settings.color_scheme_text.options.primary.label”
    },
    {
    “value”: “color-text-secondary”,
    “label”: “t:sections.global.settings.color_scheme_text.options.secondary.label”
    },
    {
    “value”: “color-text-inverse”,
    “label”: “t:sections.global.settings.color_scheme_text.options.inverse.label”
    }
    ],
    “default”: “color-text-secondary”
    },
    {
    “type”: “select”,
    “id”: “color_scheme_background”,
    “label”: “t:sections.global.settings.color_scheme_background.label”,
    “options”: [
    {
    “value”: “background-colors-default”,
    “label”: “t:sections.global.settings.color_scheme_background.options.default.label”
    },
    {
    “value”: “background-colors-secondary”,
    “label”: “t:sections.global.settings.color_scheme_background.options.secondary.label”
    },
    {
    “value”: “background-colors-accent-1”,
    “label”: “t:sections.global.settings.color_scheme_background.options.accent_one.label”
    },
    {
    “value”: “background-colors-accent-2”,
    “label”: “t:sections.global.settings.color_scheme_background.options.accent_two.label”
    },
    {
    “value”: “background-colors-inverse”,
    “label”: “t:sections.global.settings.color_scheme_background.options.inverse.label”
    }
    ],
    “default”: “background-colors-default”
    },
    {
    “type”: “header”,
    “content”: “t:sections.header.blocks.menu-promo-card.settings.header.label”
    },
    {
    “type”: “textarea”,
    “id”: “card_title”,
    “label”: “t:sections.header.blocks.menu-promo-card.settings.title.label”,
    “default”: “Heading goes here”
    },
    {
    “type”: “select”,
    “id”: “card_button_style”,
    “label”: “t:sections.global.settings.button_style.label”,
    “options”: [
    {
    “value”: “button–filled”,
    “label”: “t:sections.global.settings.button_style.options.filled.label”
    },
    {
    “value”: “button–outlined”,
    “label”: “t:sections.global.settings.button_style.options.outlined.label”
    },
    {
    “value”: “button–outlined-inverse”,
    “label”: “t:sections.global.settings.button_style.options.outlined_inverse.label”
    },
    {
    “value”: “button–text”,
    “label”: “t:sections.global.settings.button_style.options.text.label”
    }
    ],
    “info”: “t:sections.global.settings.button_style.info”,
    “default”: “button–text”
    },
    {
    “type”: “text”,
    “id”: “card_button_text”,
    “label”: “t:sections.header.blocks.menu-promo-card.settings.button_text.label”
    },
    {
    “type”: “url”,
    “id”: “card_button_url”,
    “label”: “t:sections.header.blocks.menu-promo-card.settings.button_url.label”
    }
    ]
    }
    ]
    }
    {% endschema %}

    Hi @Chibeautylounge :waving_hand: READ: https://community.shopify.com/c/blog/how-to-get-support-from-the-community/ba-p/1399408

    DO NOT post giant walls of text/code, or at least put in the effort to use the code formatting options in the post editors three button menu.

    A giant wall is not the same as an inspectable or curate minimal reproducible sample

    “I got an error message saying I need to fix a damaged HTML-tag…”

    other people are not mind readers ‘error message’ doesn’t mean anything be SPECIFIC and communicate what the message actually said in text and the steps YOU took to get there that know else knows because you are not communicating your experience.

    Lack of effort for poor communication skills in problem statements is a giant hallmark of future failure.

    Take it very seriously and put in the effort or join the unanswered 400k deep in failure.

    Hi @Chibeautylounge ,

    Thanks for reaching out to the community. We are MooseDesk, a comprehensive Live Chat, FAQ & Helpdesk App designed to elevate your customer support experience.

    Let me review and provide a clear list of damaged HTML-tag issues and their fixes:
    In the DOMContentLoaded script block:

    // Current code that may cause errors 
    const sublinksHeight = dropdownElement.offsetHeight;
    // Because dropdownElement could be null
    
    // Should be fixed to:
    if (dropdownElement) {
      const sublinksHeight = dropdownElement.offsetHeight;
      document.documentElement.style.setProperty('--dropdown-after-height', `${sublinksHeight}px`);
    }​
    

    In the menu dropdown section:

    {%- if has_dropdown -%}
    
      
    {%- endif -%}​
    
    => Need to ensure corresponding closing 
     tag exists.
    

    In header__nav-sublinks section

    {%- if child_link.links.size > 0 -%}
    
      
    {%- endif -%}
    
    => Should add corresponding closing 
     tag.
    

    To prevent damaged HTML-tags, add validation before rendering elements:

    {%- if section.settings.menu != blank and linklists[section.settings.menu].links.size > 0 -%}
      
    {%- endif -%}​
    

    In logo rendering section:

    {%- if section.settings.logo_svg_code != blank -%}
      {{- section.settings.logo_svg_code -}}
    {%- elsif section.settings.logo != blank -%}
      
      {%- if section.settings.logo.src != blank -%}
        {{ section.settings.logo | image_tag: ... }}
      {%- endif -%}
    {%- endif -%}
    

    I hope this answer addresses your question effectively. If you found it helpful, we’d appreciate a ‘LIKE’ for MooseDesk. If your issue is resolved, please mark this as 'SOLUTION’.

    In the meantime, our MooseDesk Team is always here to help with customer support solutions. We’re passionate about improving your customer experiences through our Live Chat, WhatsApp, FAQ, and Helpdesk.

    With MooseDesk, you can engage with customers through omnichannel support, manage inquiries with a robust ticket system, and provide quick responses.

    • Or you can let customers resolve questions faster with in-built FAQ, Order tracking module, and more.

    Once again, keep up the fantastic work, and I wish you the best of luck in the future!