html::tag($name, $content = null, $attr = array())

Generates an Html tag with optional content and attributes

  • $name (string)
    The name of the tag, i.e. "a"
  • $content (mixed)
    The content if availble. Pass null to generate a self-closing tag, Pass an empty string to generate empty content
  • $attr (array)
    An associative array with additional attributes for the tag
  • return (string)
    The generated Html