Phalcon\Html\TagFactory is a component that generates HTML tags. This component creates a new class locator with predefined HTML tag classes attached to it. Each tag class is lazy loaded for maximum performance. To instantiate the factory and retrieve a tag helper, you need to call newInstance() by passing a Phalcon\Html\Escaper object to it.
If you do not wish to call newInstance(), you can always use the method call that corresponds to the name of the helper. Some helpers accept a bool$raw parameter, which defines whether the input will be escaped or not. This is useful when creating anchor links with images.
All helpers that are used by the Phalcon\Html\TagFactory are located under the Phalcon\Html\Helper namespace. You can create each of these classes individually if you wish to, or you can use the tag factory as shown above.
NOTE: The code and output below has been formatted for readability