Fix HTML errors in your theme code

When making changes to your theme settings on the Customize theme page, you might see an 'HTML error found' warning message in the editor:

Broken theme code banner

This error message appears when a syntax error is found in your theme code. To resolve the problem, you can examine the code in the Liquid file that is referenced in the error message. In the example above, this would be the slideshow.liquid.

Finding the problem in your theme code

  1. Click on the .liquid section file that is linked to in the error message. This will take you to the Edit HTML/CSS page, and the file will open in the code editor.

  2. Look through the code in the file and try to find invalid HTML or Liquid. The code editor will show potential syntax errors in red. Common problems include the following:

    • Extra closing HTML tags, for example, a closing </div> without an opening <div>
    • Extra unclosed HTML tags, for example, an opening <div> without a closing </div>
    • Malformed HTML tags, for example, <div class="my-class" without a >
    • Malformed Liquid code
    • Broken HTML in an included theme snippet file
  3. Once you've found the problem, correct the code in your theme file.

  4. Click Save.

  5. Click Customize theme to return to the Customize theme page, and confirm that the error message is gone.

Other solutions

If you are unable to resolve the problem by following the previous steps, then consider the following options:

Want to discuss this page?

Visit the Shopify Community

Ready to start selling online with Shopify?

Try it free