$options = array('option1', 'option2', 'option3'); echo JHtml::select('myselect', $options, null, ['class' => 'form-control']);
$data = array( array('Name', 'Age', 'Gender'), array('John', '23', 'Male'), array('Jane', '30', 'Female') ); echo JHtml::table($data, ['class' => 'table']);
$items = array('Item 1', 'Item 2', 'Item 3'); echo JHtml::_( 'menu.legacy', $items, ['class' => 'list-group']);This will generate an HTML list element with the given items and a CSS class. Overall, JHtml provides a convenient way to generate HTML elements in Joomla.