How to Stream HTML

I am currently using this WordPress PHP, but the problem is that it is limiting my styling. How would I do this so that I could include HTML that references classes?

<?php wp_tag_cloud('smallest=10&largest=10&number=10&orderby=count&order=DESC&topic_count_text_callback=default_topic_count_text&format=list'); ?>

Somebody suggested something like this:

$tag_cloud = wp_tag_cloud('format=array&echo=0') 

But I really don’t know how to do that. Any help would be appreciated. You cane see the function reference here: Function Reference/wp tag cloud « WordPress Codex


So I was able to find the below code, but my question is…

//list all tags that are assigned to posts
  $taxonomy = 'post_tag';
  $terms = get_terms( $taxonomy, '' );
  if ($terms) {
    foreach($terms as $term) {
      if ($term->count > 0) {
        echo '<p>' . '<a href="' . esc_attr(get_term_link($term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $term->name ) . '" ' . '>' . $term->name.'</a> has ' . $term->count . ' post(s). </p> ';

How do in incorporate the below? I need those variables in the above, but am not good with PHP!

<?php wp_tag_cloud('smallest=10&largest=10&number=10&orderby=count&order=DESC&topic_count_text_callback=default_topic_count_text&format=list'); ?