<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.8.0/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">
    <script src="http://yui.yahooapis.com/3.10.1/build/yui/yui-min.js"></script>
	<title>Canteen HTML5 API v1.0.0 API Documentation : html</title>  
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
            
                <h1><a href=""><img src="../assets/css/logo.png" title="Canteen HTML5 API"></a></h1>
            
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Documentation for: 1.0.0</em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
    <h2 class="off-left">APIs</h2>
    <div id="api-tabview" class="tabview">
        <div id="api-tabview-filter">
            <input type="search" id="api-filter" placeholder="Type to filter APIs">
        </div>
		<ul class="tabs">
            <li><a href="#api-classes">Classes</a></li>
			<li><a href="#api-modules">Namespaces</a></li>
        </ul>
        <div id="api-tabview-panel">
            <ul id="api-classes" class="apis classes">
            
                <li><a href="../classes/Attribute.html">Attribute</a></li>
            
                <li><a href="../classes/Comment.html">Comment</a></li>
            
                <li><a href="../classes/Document.html">Document</a></li>
            
                <li><a href="../classes/html.html">html</a></li>
            
                <li><a href="../classes/HTML5Error.html">HTML5Error</a></li>
            
                <li><a href="../classes/Node.html">Node</a></li>
            
                <li><a href="../classes/NodeContainer.html">NodeContainer</a></li>
            
                <li><a href="../classes/SimpleList.html">SimpleList</a></li>
            
                <li><a href="../classes/Table.html">Table</a></li>
            
                <li><a href="../classes/Text.html">Text</a></li>
            
            </ul>

            <ul id="api-modules" class="apis modules">
            
                <li><a href="../modules/Canteen_HTML5.html">Canteen\HTML5</a></li>
            
                <li><a href="../modules/global.html">global</a></li>
            
            </ul>
        </div>
    </div>
</div>

            </div>
        </div>
        <div class="yui3-u-3-4">
            <div id="api-options">
        Show:
        <label for="api-show-inherited">
            <input type="checkbox" id="api-show-inherited" checked>
            Inherited
        </label>

        <label for="api-show-protected">
            <input type="checkbox" id="api-show-protected">
            Protected
        </label>

        <label for="api-show-private">
            <input type="checkbox" id="api-show-private">
            Private
        </label>
        <label for="api-show-deprecated">
            <input type="checkbox" id="api-show-deprecated">
            Deprecated
        </label>

    </div>
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
                        <h1>html Class</h1>
<div class="box meta">
    

    

    

    
        
            Namespace: <a href="../modules/global.html">global</a>
        
    

    
</div>



<div class="box intro">
    <p>This is the global function is the main entry for interacting with the HTML5 for PHP library. 
using <code>html()</code> global function you can create HTML5 quickly and easily. For more
examples and instruction on how to use this library, please refer to the the 
<a href="https://github.com/Canteen/CanteenHTML5">GitHub project</a>. 
To install the library simply include <code>html.php</code>, this takes care of any autoloading that&#39;s needed
for the rest of the library.</p>
<pre class="code prettyprint"><code>echo html(&#39;img src=home.jpg&#39;); 
echo html(&#39;img&#39;, &#39;src=home.jpg&#39;); 
echo html(&#39;a&#39;, array(&#39;href&#39;=&gt;&#39;about.html&#39;));</code></pre>

</div>


    <div class="constructor">
        <h2>Constructor</h2>
        <div id="method_html" class="method item">
    <h3 class="name"><code>html</code></h3>

    
        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
            
                <li class="arg">
                    
                        <code>tag</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[childrenOrAttributes=null]</code>
                    
                </li>
            
                <li class="arg">
                    
                        <code class="optional">[attributes=null]</code>
                    
                </li>
            
            </ul><span class="paren">)</span>
        </div>
    

    
        <span class="returns-inline">
            <span class="type"><a href="../classes/Node.html" class="crosslink">Node</a></span>
        </span>
    

    

    

    

    

    

    

    <div class="meta">
        
            
                
                <p>
                
            
        
        
        </p>


        

        
    </div>

    <div class="description">
        
    </div>

    
        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
            
                <li class="param">
                    
                        <code class="param-name">tag</code>
                        <span class="type"><a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                    

                    

                    <div class="param-description">
                        <p>The name of the tag as a string for example &#39;tr&#39;, &#39;table&#39;, can be followed 
         by CSS selector, e.g. &#39;a#backButton&#39; or &#39;a.button&#39;</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[childrenOrAttributes=null]</code>
                        <span class="type">Dictionary | <a href="../classes/Node.html" class="crosslink">Node</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a> | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array" class="crosslink external" target="_blank">Array</a></span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>If the tag is a NodeContainer, this can be an array 
          of attributes, another html node or some text. If the tag is a single node, this can 
      be an array or chain of attributes</p>

                    </div>

                    
                </li>
            
                <li class="param">
                    
                        <code class="param-name optional">[attributes=null]</code>
                        <span class="type">Dictionary | <a href="https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String" class="crosslink external" target="_blank">String</a></span>
                        <span class="flag optional" title="This parameter is optional.">optional</span>
                    

                    

                    <div class="param-description">
                        <p>The attributes list for container tags (e.g., &#39;class:selected&#39;)</p>

                    </div>

                    
                </li>
            
            </ul>
        </div>
    

    
        <div class="returns">
            <h4>Returns:</h4>

            <div class="returns-description">
                
                    
                        <span class="type"><a href="../classes/Node.html" class="crosslink">Node</a></span>:
                    
                    <p>Return the html node</p>

                
            </div>
        </div>
    

    
</div>

    </div>


<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

        
        
        
        
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

            

            

            

            
        </div>

        

        

        

        
    </div>
</div>

                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>