Changing the h2 tag size on product pages

Topic summary

A user modified their product page template to use an <h2> tag for the product type section, but this change unexpectedly altered the text size. They attempted to fix it by changing the class style from uppercase to lowercase without success.

Key details:

  • The issue is specific to product pages only
  • The user included a code snippet showing their Liquid template markup (appears reversed/garbled in the post)
  • They’re seeking CSS or template-level solutions to control the <h2> font size exclusively on product pages

Status: The question remains unanswered with no solutions or responses provided yet.

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

Hi everyone,

Changed the product type section of my product page to a h2 tag. Problem is its changed the text size. Is there a way to change the h2 size on product only pages?

Here is the code section, changed the class style to lowercase which didn’t help was previously uppercase

{%- if settings.show_product_type -%}

  • <h2 href=“{{ routes.collections_url }}/{% if collection == blank %}all{% else %}{{ collection.handle }}{% endif %}?filter.p.product_type={{ product.type | downcase | excape | replace: ’ ‘,’+’ }}”
    class= style=“text-lowercase”

    {{ product.type }}

  • {%- endif -%}

    Please help been stuck on this for ages