This page was printed on Feb 22, 2019. For the current version, visit https://help.shopify.com/en/themes/customization/products/features/add-tabs-to-product-descriptions.
Because all themes are different, no single method will serve all themes perfectly. Please use this as an overview and not as an exact method.
For this demo, you will adding three tabs to all product pages. In the first tab, you will load up the product description. In a second tab, you will load up a snippet. In the third tab, you will load a static page. When you are done, your product page will display 3 tabs:
Check for jQuery
Most themes use jQuery, but, just to be sure, check your theme.liquid file for the presence of jQuery.
If your theme does not already use jQuery, you will need to include jQuery in the head of your document. To check if you're already using jQuery, open the theme.liquid file in the online code editor. Use the shortcut command+f (mac) or ctrl+f (pc) and find the term "jQuery". If you can locate it, you're already using it, and if not, then it's time to include it in your header.
In the product-template.liquid template, locate your product description.
Replace it with the following code:
In the first tab, you will load your product description. So, you will change the link to "Info" and add the liquid tag for the product description into the div holding the tab's content.
In the second tab, include a snippet (make sure to create a new snippet and call it "shipping"), mainly because this will contain content that you do not want indexed by search engines, or to come up in a site search.
In the third and last tab, place the content of the Returns page. It doesn't matter if that comes up in a search or is indexed by Google.
Add some jQuery
You should end up with something like this:
Use CSS to make it beautiful
With CSS, you will end up with something like this:
Here is some sample CSS to add at the bottom of your sections/product-template.liquid template (if you are using a sectioned theme), or your templates/product.liquid file (if you are using a non-sectioned theme):