---
title: "Liquid filters: link_to_type"
description: |-
Generates an HTML `` tag with an `href` attribute linking to a [collection page](https://shopify.dev/docs/storefronts/themes/architecture/templates/collection) that lists all products of the given
product type.
api_name: liquid
source_url:
html: https://shopify.dev/docs/api/liquid/filters/link_to_type
md: https://shopify.dev/docs/api/liquid/filters/link_to_type.md
---
# link\_to\_type
```oobleck
string | link_to_type
```
returns [string](https://shopify.dev/docs/api/liquid/basics#string)
Generates an HTML `` tag with an `href` attribute linking to a [collection page](https://shopify.dev/docs/storefronts/themes/architecture/templates/collection) that lists all products of the given product type.
##### Code
```liquid
{{ 'Health' | link_to_type }}
```
##### Output
```html
Health
```
### HTML attributes
```oobleck
string | link_to_type: attribute: string
```
You can specify [HTML attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attributes) by including a parameter that matches the attribute name, and the desired value.
##### Code
```liquid
{{ 'Health' | link_to_type: class: 'link-class' }}
```
##### Output
```html
Health
```