The html helper contains methods that assist in working with html.
Convert special characters to HTML entities. All untrusted content should be passed through this method to prevent XSS injections.
echo Html::chars($username);
Compiles an array of HTML attributes into an attribute string. Attributes will be sorted using Html::$attribute_order for consistency.
echo '<div'.Html::attributes($attrs).'>'.$content.'</div>';
Create br tags.
echo Html::br(2);
Create nbsp
echo Html::nbsp(2);
Create an arrow
echo Html::arrow('right');
echo Html::arrow('left');
echo Html::arrow('up');
echo Html::arrow('down');
Create HTML link anchor.
echo Html::anchor('About', 'http://sitename.com/about');
Create HTML
echo Html::heading('Title', 1);
Generate document type declarations.
echo Html::doctype('html5');
Create image.
echo Html::image('data/files/pic1.jpg');
Convert html to plain text.
echo Html::toText('test');