The WP HTML Helper contains functions that assist in working with HTML
include wp-html-helper.php file in your theme or plugin.
<div class="image">
img_tag(
array(
'url' => 'img.png', // image url
'alt' => 'Img alt', // image alter tag ( by default image name set as alt )
'class' => 'img-class', // class name
)
);
</div>
### Output :
<div class="image">
<img src="img.png" alt="Img alt" class="img-class" />
</div>
img_tag(
array(
'url' => '',
'alt' => '',
'class' => '',
'id' => '',
'width' => '',
'height' => '',
'srcset' => ''
)
);
anchor_tag(
array(
'url' => '',
'text' => '',
'target' => '',
'class' => '',
'id' => '',
)
);
heading_tag(
array(
'tag' => '',
'text' => '',
'class' => '',
'id' => '',
)
);
paragraph_tag(
array(
'text' => '',
'class' => '',
'id' => '',
)
);
other_tag(
array(
'tag' => '',
'text' => '',
'class' => '',
'id' => '',
)
);
button_element(
array(
'text' => '',
'type' => '',
'class' => '',
'id' => '',
)
);