
Comparison table
An "Us vs. Them" comparison table designed to build trust by highlighting brand advantages. It features a clean, high-contrast design with green checkmarks and red cross icons to visually differentiate features against competitors.
- Green SVG checkmarks and red cross icons for visual contrast
- Scoped CSS with unique class suffixes to prevent style bleeding
- Zebra-striped rows for improved readability on long lists
- Responsive table container with shadow depth and rounded corners
- Adding an "Us vs. Them" section to a product page to handle objections.
- Comparing high-level service features on a landing page or About Us page.
- Most Shopify themes
The code
1<!DOCTYPE html>2<html lang="en">3<head>4 <meta charset="UTF-8">5 <meta name="viewport" content="width=device-width, initial-scale=1.0">6 <title>Comparison Table</title>7 <style>8 body.unique-body-Abc123 {9 font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;10 background-color: #f0f2f5;11 display: flex;12 justify-content: center;13 align-items: center;14 height: 100vh;15 margin: 0;16 padding: 2px 0; /* Üstten ve alttan 2px boşluk */17 }1819 .unique-comparison-table-Def456 {20 width: 100%;21 max-width: 700px;22 border-collapse: separate;23 border-spacing: 0;24 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);25 background-color: #fff;26 border-radius: 10px;27 overflow: hidden;28 margin: 2px 0; /* Üstten ve alttan 2px boşluk */29 }3031 .unique-comparison-table-Def456 th, .unique-comparison-table-Def456 td {32 border: none;33 padding: 15px;34 text-align: center;35 font-size: 14px;36 }3738 .unique-comparison-table-Def456 th {39 background-color: #333; /* Çok koyu olmayan siyah renk */40 color: #fff;41 font-weight: 600;42 text-transform: uppercase;43 }4445 .unique-comparison-table-Def456 th:first-child, .unique-comparison-table-Def456 td:first-child {46 text-align: left;47 padding-left: 20px;48 }4950 .unique-comparison-table-Def456 tbody tr {51 border-bottom: 1px solid #e0e0e0;52 }5354 .unique-comparison-table-Def456 tbody tr:last-child {55 border-bottom: none;56 }5758 .unique-check-Ghi789 {59 color: #28a745; /* Yeşil renk */60 }6162 .unique-cross-Jkl012 {63 color: #dc3545; /* Kırmızı renk */64 }6566 .unique-icon-Mno345 {67 font-size: 18px;68 }6970 .unique-comparison-table-Def456 tbody tr:nth-child(odd) {71 background-color: #f9f9f9;72 }73 </style>74</head>75<body class="unique-body-Abc123">7677<table class="unique-comparison-table-Def456">78 <thead>79 <tr>80 <th>Aspect</th>81 <th>Your brand</th>82 <th>Competitor</th>83 </tr>84 </thead>85 <tbody>86 <tr>87 <td>Price</td>88 <td>XX</td>89 <td>XX</td>90 </tr>91 <tr>92 <td>Features</td>93 <td class="unique-icon-Mno345 unique-check-Ghi789">94 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">95 <path d="M9 19L3 13l1.41-1.41L9 16.17l10.59-10.59L21 5l-12 12z"/>96 </svg>97 </td>98 <td class="unique-icon-Mno345 unique-cross-Jkl012">99 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">100 <path d="M19.41 6.58L18 5.17 12 11.17 6 5.17 4.59 6.58 10.59 12.58 4.59 18.58 6 20l6-6 6 6 1.41-1.41-6-6z"/>101 </svg>102 </td>103 </tr>104 <tr>105 <td>Durability</td>106 <td class="unique-icon-Mno345 unique-check-Ghi789">107 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">108 <path d="M9 19L3 13l1.41-1.41L9 16.17l10.59-10.59L21 5l-12 12z"/>109 </svg>110 </td>111 <td class="unique-icon-Mno345 unique-cross-Jkl012">112 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">113 <path d="M19.41 6.58L18 5.17 12 11.17 6 5.17 4.59 6.58 10.59 12.58 4.59 18.58 6 20l6-6 6 6 1.41-1.41-6-6z"/>114 </svg>115 </td>116 </tr>117 <tr>118 <td>Warranty</td>119 <td class="unique-icon-Mno345 unique-check-Ghi789">120 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">121 <path d="M9 19L3 13l1.41-1.41L9 16.17l10.59-10.59L21 5l-12 12z"/>122 </svg>123 </td>124 <td class="unique-icon-Mno345 unique-cross-Jkl012">125 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">126 <path d="M19.41 6.58L18 5.17 12 11.17 6 5.17 4.59 6.58 10.59 12.58 4.59 18.58 6 20l6-6 6 6 1.41-1.41-6-6z"/>127 </svg>128 </td>129 </tr>130 <tr>131 <td>Customer Service</td>132 <td class="unique-icon-Mno345 unique-check-Ghi789">133 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">134 <path d="M9 19L3 13l1.41-1.41L9 16.17l10.59-10.59L21 5l-12 12z"/>135 </svg>136 </td>137 <td class="unique-icon-Mno345 unique-cross-Jkl012">138 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">139 <path d="M19.41 6.58L18 5.17 12 11.17 6 5.17 4.59 6.58 10.59 12.58 4.59 18.58 6 20l6-6 6 6 1.41-1.41-6-6z"/>140 </svg>141 </td>142 </tr>143 <tr>144 <td>Ease of use</td>145 <td class="unique-icon-Mno345 unique-check-Ghi789">146 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">147 <path d="M9 19L3 13l1.41-1.41L9 16.17l10.59-10.59L21 5l-12 12z"/>148 </svg>149 </td>150 <td class="unique-icon-Mno345 unique-cross-Jkl012">151 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" width="18" height="18">152 <path d="M19.41 6.58L18 5.17 12 11.17 6 5.17 4.59 6.58 10.59 12.58 4.59 18.58 6 20l6-6 6 6 1.41-1.41-6-6z"/>153 </svg>154 </td>155 </tr>156 </tbody>157</table>158159</body>160</html>
How to install Comparison table on your Shopify theme
This snippet belongs in sections/main-product.liquid, directly under the Add to cart button, where it reinforces the purchase decision. Expect the whole job to take about 5–10 minutes.
- 1From your Shopify admin, open Online Store → Themes, click the … button on your live theme and choose Duplicate. Always work on a copy so you can roll back instantly.
- 2On the duplicated theme, click … → Edit code to open the theme code editor.
- 3Open sections/main-product.liquid in the file tree. If your theme uses different file names, search for the template that renders the area where you want the block to show up.
- 4Click Copy code on this page, then paste the snippet directly under the Add to cart button, where it reinforces the purchase decision.
- 5The snippet ships with its own scoped
<style>block, so you do not need to touchbase.cssortheme.css. If you prefer to keep CSS centralised, move the contents of the style tag into your theme stylesheet and delete the inline block. - 6Click Save, then hit Preview and check the block on desktop, tablet and mobile widths.
- 7When you are happy with the result, publish the duplicated theme from Online Store → Themes → Actions → Publish.
How to customise it
Every value below lives inside the snippet, so you can adapt Comparison table to your brand without touching the rest of the theme.
- Colours — the snippet uses
#f0f2f5,#fff,#333,#e0e0e0. Replace those values inside the style block with your brand palette, keeping at least a 4.5:1 contrast ratio between text and background so the block stays accessible. - Typography — the block declares
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif. Delete that line to inherit your theme font instead, which usually looks better integrated. - Sizing — adjust the font-size values (14px, 18px) and the padding so the block carries the same visual weight as the elements around it.
- Corners —
border-radius: 10pxcontrols the roundness. Set it to 0 for a sharper editorial look, or increase it for a softer, app-like feel. - Copy — rewrite the hard-coded text (for example “Comparison Table”) in your own brand voice, and translate it if you sell in more than one language.
Common mistakes to avoid
These are the issues merchants run into most often when installing a snippet like this one.
- Editing the live theme directly. Duplicate it first — a single unbalanced Liquid tag can take a storefront down mid-campaign.
- Pasting the code into the wrong file. Dropped into
layout/theme.liquidinstead ofsections/main-product.liquid, this block will render on every page of the store, including ones where it makes no sense. - Renaming the CSS classes in the markup but not in the style block, or vice versa. The class names have to match exactly or the styling silently disappears.
- Publishing without testing on a real phone. Most Shopify traffic is mobile, and layout problems almost always surface there first.
Performance notes
What this block costs you in load time, and how to keep that cost at zero.
- The CSS is inline and scoped to this block, so it adds no extra network request. At a few kilobytes it has no measurable effect on your Lighthouse score.
- Run PageSpeed Insights before and after you add the block so you have a concrete number rather than a guess.
SEO & accessibility
How to add this block without damaging your on-page structure or your rich results.
- Nothing in this snippet should replace your page
<h1>. Keep product and page headings intact and use<h2>or<h3>for the block's own heading so the document outline stays clean. - If the block shows review or rating content, keep it consistent with the structured data your review app already outputs. Duplicating or contradicting rating markup can cost you the rich result entirely.
- The block does not create a new URL, so there is no canonical or indexing change to make. It improves on-page engagement signals rather than crawlability.
Comparison table — questions merchants ask
Will this snippet work with my theme?
It is built with standard Liquid, HTML and CSS, so it works with Dawn and virtually every Online Store 2.0 theme, as well as most vintage themes. The only thing that changes between themes is the file you paste it into — if yours has no sections/main-product.liquid, look for the equivalent template that renders the same area.
Do I need an app to use it?
No. This is theme code you own outright: no monthly fee, no third-party script tag, and no app that can break your storefront the next time it updates.
How long does it take to add “Comparison table” to a store?
Most merchants have it live in under fifteen minutes — duplicate the theme, paste the code, adjust the colours and copy, preview on mobile, publish.
The styling looks broken after pasting. How do I fix it?
Confirm you copied the whole snippet including the closing style tag, then check whether one of your theme's own CSS rules is overriding it. If a theme rule wins, increase the specificity of the snippet's selector rather than scattering !important through the file.
Will it slow my store down?
Not meaningfully. It is inline markup with scoped CSS and at most a few lines of vanilla JavaScript — no external libraries, no extra HTTP request. Optimising your product images will always have a far bigger impact on load time.
Can I use it on a client store or a commercial project?
Yes. Every snippet in the MCO Hub library is free to copy, modify and ship on any store, including client work. Attribution is appreciated but not required.
Related snippets
Keep exploring
Guides
Templates



