Lets start from creating object of the report generator:
$report=newHtml();
And since that moment we can add elements to the head or body:
// not that stylesheets are not validated, it is totally on your side$report->head()->style()->selector('p')->css('color','red');$report->head()->style()->selector('div')->css('color','green');;$report->body()->p('Hello!');$report->body()->div('World!');// here we get HTML code in the variable $result$result=$report->compile();
More complex examples
This example shows that every call creates new tag (except html and body). So if you want to add multyple tags then you need to store tag into variable: