startTag($tagname, $attributes, $close); // if we got something to put inside, wrap it up // otherwise put it in a self-closing tag // n.b., this is potentially flawed for