# How to apply templates for Html tags?

**URL:** <https://discourse.cakephp.org/t/how-to-apply-templates-for-html-tags/1713>\
**Category:** Need Help\
**Created:** [December 12, 2016, 2:18pm UTC](https://discourse.cakephp.org/t/how-to-apply-templates-for-html-tags/1713 "2016-12-12T14:18:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![celsowm](https://avatars.discourse-cdn.com/v4/letter/c/74df32/32.png) [@celsowm](https://discourse.cakephp.org/u/celsowm)\
**Post date:** [December 12, 2016, 2:18pm UTC](https://discourse.cakephp.org/t/how-to-apply-templates-for-html-tags/1713/1 "2016-12-12T14:18:52Z")

</div>

Hi !  
I need to change the default “output” of some tags printed using HtmlHelper. I’ve had success with Form Helper using something like this:

```
$this->loadHelper('Form', [
    			'templates' => 'Pge.pge_templates'
    	]);

```

and

```
return [
    'inputContainer' => '<div class="input form-group {{type}}{{required}}">{{content}}</div>',
    'input' => '<input class="form-control" type="{{type}}" name="{{name}}"{{attrs}}/>',
    'textarea' => '<textarea class="form-control" name="{{name}}"{{attrs}}>{{value}}</textarea>',
    'select' => '<select class="form-control" name="{{name}}"{{attrs}}>{{content}}</select>',
    'dateWidget' => '{{day}}{{month}}{{year}}{{hour}}{{minute}}{{second}}{{meridian}}'
];

```

How can I apply this same approach to html tags like **table** or **span**?

Thanks in advance,  
Celso
