# Readable Tag Cloud Sizes

> Keeps the smallest tags in tag cloud widgets and blocks large enough to read and tap, and sizes them in relative units so they grow with the visitor's text size.

- Type: PHP
- Runs: Run everywhere
- Category: [Accessibility](https://wpide.com/library/category/accessibility/)
- Tags: tag-cloud, font-size, widgets
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/a11y-readable-tag-cloud/

## Code

```php
add_filter( 'widget_tag_cloud_args', function ( $args ) {
    $args['smallest'] = 0.9;
    $args['largest']  = 1.5;
    $args['unit']     = 'em';

    return $args;
} );
```

## Notes

Change the smallest and largest values (in em) to fit your design.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Readable Tag Cloud Sizes" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
