Basic Tag Cloud

This post assumes basic understanding of PHP, HTML, and CSS.

Creating my blog by hand gave me the opportunity to work with many features that come standard with online blogging software. I developed tag clouds, post filtering, and the search functions based on the visual functionality that other blogs appeared to have. With this post, I'm going to explain how to make a tag cloud using PHP and CSS that can be implemented on any type of article- or post-based environment.

Most blogs that use tags allow multiple tags per post and tags being placed on multiple posts. The tag not only helps explain what the post is about, but also gives basic navigation based on tag for users interested in a specific blog category. A tag cloud provides the navigation with an additional feature: tags that are used more often in the blog are increased in font size, giving them more weight compared to less-used tags.

The first thing that you'll need is a PHP array of all your blog tags. The creation of this array is wholly dependent on your blog setup ...

read more »