| 
<?php
 /**
 * @author Tony Frezza
 * @copyright 2017
 */
 
 include('html.php');
 
 
 $html = new Html;
 
 
 /**
 En:
 Note that each node relative to a tag is informed by an array.
 Each child node is an array, since it is a tag.
 So, for the children of a parent node, we will have an array of arrays
 
 Pt-BR:
 Observe que cada nó relativo a uma tag é informado por um array.
 Cada nó filho é uma array, uma vez que é uma tag.
 Assim, para os nós filhos de um nó pai, teremos um array de arrays
 */
 
 
 $html->add(
 array(
 'tag'       =>  'ul',
 'children'  =>  array(
 array(
 'tag'       =>  'li',
 'text'      =>  'foo'
 ),
 array(
 'tag'       =>  'li',
 'text'      =>  'bar'
 )
 )
 )
 );
 
 echo $html->getHtml();
 
 $html->resetHtml();
 
 $html->add(
 array(
 'tag'       =>  'div',
 'style'     =>  'width: 100%; border: solid; text-align: center;',
 'children'  =>  array(
 array(
 'tag'       =>  'div',
 'style'     =>  'width:100%; height: 20px; background: red;',
 'text'      =>  'Child DIV node with style attribute',
 ),
 array(
 'tag'       =>  'div',
 'style'     =>  'width:100%; height: 30px; background: blue;',
 'text'      =>  'Child DIV node with style attribute',
 ),
 )
 )
 );
 
 echo $html->getHtml();
 
 ?>
 |