'btn btn-primary']); ?>
'container']); // Add content to the div echo 'This is some content within the div.'; // Close the div tag echo Html::endTag('div'); ?>
'table']); // Add a row to the table $table .= Html::beginTag('tr'); $table .= Html::tag('td', 'Name'); $table .= Html::tag('td', 'Age'); $table .= Html::endTag('tr'); // Add another row $table .= Html::beginTag('tr'); $table .= Html::tag('td', 'John'); $table .= Html::tag('td', '26'); $table .= Html::endTag('tr'); // Close the table $table .= Html::endTag('table'); echo $table; ?>In this example, the `Html` class is used to build a simple table with two rows and two columns. The `tag` method is used to create the table cells and the `beginTag` and `endTag` methods are used to delimit the table and table row. The resulting HTML is displayed on the page. The yii\helpers\Html package library is used in these examples.