Learn to Build Trust Badges on Your Shopify Product Page

Learn to Build Trust Badges on Your Shopify Product Page

Table of Contents:

  1. Introduction
  2. Building Trust Badges on Your Product Page 2.1. Adding Trust Badges on the Custom Liquid Block 2.2. Using Codepen.io for HTML and CSS
  3. Understanding the Structure of Trust Badges
  4. Creating the HTML Structure for Trust Badges 4.1. Using Divs to Create Containers 4.2. Adding Paragraphs for Text 4.3. Inserting Image Tags for Icons
  5. Styling Trust Badges with CSS 5.1. Changing Image Sizes with Width 5.2. Aligning Icons and Text with Text Align and Justify Content 5.3. Adjusting Widths for Multiple Columns 5.4. Removing Unnecessary CSS and Cleaning Up Code 5.5. Customizing Fonts and Adding Comments 5.6. Wrapping Icons and Adding Margins 5.7. Creating Background Circles and Centering Trust Badges 5.8. Handling Image Backgrounds and Max Widths
  6. Conclusion

Building Trust Badges on Your Product Page

Trust badges are an essential element for any e-commerce store. They provide customers with a sense of security and reliability, ultimately boosting conversion rates. In this tutorial, we will guide you through the process of building trust badges on your product page using HTML and CSS. You don't need to have any coding experience to follow along. By the end of this tutorial, you will have a visually appealing and trustworthy product page.


Trust badges, also known as payment icons, are small graphical elements that signify security and trustworthiness to customers. These badges display logos of recognized payment providers, such as Visa, Mastercard, PayPal, and more. By incorporating trust badges into your product page, you instill confidence in your customers, reassuring them that their transactions are secure.

Building Trust Badges on Your Product Page

To begin building trust badges on your product page, you will need to have Shopify 2.0 and access to the custom liquid block. The custom liquid block allows you to add custom code to your theme. If you don't have coding experience or prefer a simplified approach, you can skip the coding process and purchase the code and notes for this tutorial for a small fee of $10 on my Gumroad.

1. Adding Trust Badges on the Custom Liquid Block

The custom liquid block is a powerful tool that enables you to customize your Shopify store. To add trust badges, we will write code using HTML and CSS within this block. However, it's essential to avoid using class names that conflict with existing classes in your theme. By adding a prefix to your classes, like "EC" for Ed Codes, you ensure uniqueness and prevent interference with your theme's design.

2. Using Codepen.io for HTML and CSS

For a more straightforward coding experience, we will use Codepen.io, an online code editor, to write and test our HTML and CSS code. Codepen.io provides code highlighting, auto-completion, and a user-friendly interface. Once we have written and tested our code on Codepen.io, we can easily copy and paste it into the custom liquid block in Shopify.

3. Understanding the Structure of Trust Badges

The structure of trust badges is relatively simple, consisting of containers, badges, text, and icons. Understanding this structure will help you navigate the HTML and CSS code and make necessary modifications. Each trust badge container holds individual badges, which contain text and icons. By targeting these elements using class names, we can apply specific styles to each component.

4. Creating the HTML Structure for Trust Badges

To build the HTML structure for trust badges, we will utilize HTML divs for containers, paragraphs for text, and image tags for icons. Divs act as generic containers, providing a structured layout for our badges. Adding class names to the divs allows us to target and style them using CSS. By arranging the divs in a vertical orientation, we create a visually appealing alignment for our trust badges.

5. Styling Trust Badges with CSS

CSS is a powerful tool for styling and customizing the appearance of trust badges. By applying CSS rules to our class names, we can control their backgrounds, alignments, widths, fonts, and more. We will use properties like background, width, text-align, justify-content, font-size, and font-weight to modify the visual aspects of our trust badges. Additionally, we will clean up unnecessary CSS and add comments for future reference.

6. Conclusion

Congratulations! You have successfully built trust badges on your product page using HTML and CSS. These badges will instill trust in your customers and enhance the credibility of your online store. Feel free to customize the design further by experimenting with different styles and layouts. Remember to save your code and continue exploring the vast possibilities of Shopify customization.


  • Building trust badges on your product page using HTML and CSS
  • Incorporating recognized payment provider logos to enhance trust
  • Using the custom liquid block in Shopify for easy code integration
  • Utilizing Codepen.io for a simplified coding experience
  • Understanding the structure of trust badges
  • Creating the HTML structure with divs, paragraphs, and image tags
  • Styling trust badges with CSS properties like width, background, and font
  • Enhancing the visual appeal by aligning icons and text
  • Wrapping icons for multiple columns and implementing max widths
  • Ensuring a clean code by removing unnecessary CSS and adding comments
  • Boosting customer confidence with background circles and centered badges


Q: Can I use this tutorial if I have no coding experience? A: Yes! This tutorial is beginner-friendly and does not require any prior coding knowledge. We provide step-by-step instructions and explanations to help you understand the concepts.

Q: Can I customize the trust badge design? A: Absolutely! Once you have built the basic trust badge structure, you can further customize the design to match your brand identity. Experiment with different styles, colors, and layouts to create a unique look.

Q: How can I add more columns to my trust badges? A: If you want to display more than three trust badges in a row, you can adjust the width of each badge using CSS. Simply divide the available space by the number of badges you want to display and set the width accordingly.

Q: Can I use this code for payment icons instead of trust badges? A: Yes, the code provided in this tutorial can be used for payment icons as well. Simply replace the text within the badges with the desired payment icons' image tags.

Q: Is it necessary to purchase the code and notes for this tutorial? A: No, the code and notes are optional. They provide a convenient reference for future use and modification. However, all the necessary information and steps are explained in the tutorial itself, so you can complete the task without purchasing the additional resources.

I am a shopify merchant, I am opening several shopify stores. I use ppspy to find Shopify stores and track competitor stores. PPSPY really helped me a lot, I also subscribe to PPSPY's service, I hope more people can like PPSPY! — Ecomvy

Join PPSPY to find the shopify store & products

To make it happen in 3 seconds.

Sign Up
App rating
Shopify Store
Trusted Customers
No complicated
No difficulty
Free trial