Using HTML Tags
Required Namespace
  • Ness
    • UI
      • HtmlTags

You can include this library to your code file by typing the below code;

use Ness\UI\HtmlTags


HTML Class: ul & ol Tag

                                
$htag = new  Ness\UI\HtmlTags();
echo $htag->ul()
                ->li("PHP")
                ->li("C#")
                ->li("VB")
                ->li("Ruby")
        ->Create();
                                
                            


                                    
$htag = new  Ness\UI\HtmlTags();
echo $htag->ol()
        ->li("PHP",array("id"=>"id-1"))
        ->li("C")
        ->li("VB")
        ->li("Ruby")
    ->Create();
                                    
                                


HTML Class: select Tag

                                    
$htag = new  Ness\UI\HtmlTags();
echo $htag->select()
    ->OptGroup("Programming Languages")
        ->option("PHP")
        ->option("C#")
        ->option("VB")
        ->option("Ruby")
    ->OptGroup("Languages")
        ->option("Greek")
        ->option("Turkish")
        ->Option("English")
->Create();

// Select with attributes:


echo $htag->select()
->OptGroup("Programming Languages")
    ->option("PHP", array("id"=>"1"))
    ->option("C#", array("id"=>"2", "class"=>"important"))
    ->option("VB", array("id"=>"3"))
    ->option("Ruby", array("id"=>"4"))
->OptGroup("Languages")
    ->option("Greek")
    ->option("Turkish")
    ->Option("English")
->Create();



                                    
                                


HTML Class: dl Tag

                                    
$htag = new  Ness\UI\HtmlTags();
echo $htag->dl()->dt("Programming Languages")
    ->dd("PHP")
    ->dd("C++")
    ->dd("Visual Basic")
    ->dt("Languages")
    ->dd("English")
    ->dd("Turkish")
    ->dd("Greek")
->Create();

//Description list with attributes;

echo $htag->dl(array("class"=>"dl-class-css"))->dt("Programming Languages")
    ->dd("PHP", array("id"=>"prog_lang-1"))
    ->dd("C++", array("class"=>"important"))
    ->dd("Visual Basic")
    ->dt("Languages")
    ->dd("English")
    ->dd("Turkish", array("class"=>"selected-css-class"))
    ->dd("Greek")
->Create();

                                    
                                


All Other Methods For HtmlTags Class

All functions in the list are static.
                                    
function A($text=null, $url=null, $attrb=null) Return string
function Abbr($text=null, $title=null, $attrb=null) Return string
function PrintCustom($txt) Return string
function Audio($source=null, $type=null) Return string
function Br() Return string
function Button($name=null, $on_clik=null, $attrb=null) Return string
function Code($text=null, $attrb=null) Return string
function Em($text=null, $attrb=null) Return string
function strong($text=null, $attrb=null) Return string
function samp($text=null, $attrb=null) Return string
function span($text=null, $attrb=null) Return string
function kbd($text=null, $attrb=null) Return string
function embed($src=null, $attrb=null) Return string
function H1($text=null, $attrb=null) Return string
function H2($text=null, $attrb=null) Return string
function H3($text=null, $attrb=null) Return string
function H4($text=null, $attrb=null) Return string
function H5($text=null, $attrb=null) Return string
function H6($text=null, $attrb=null) Return string
function H1($text=null, $attrb=null) Return string
function Hr() Return string
function I($text=null, $attrb=null) Return string
function U($text=null, $attrb=null) Return string
function Img($src=null, $attrb=null) Return string
function Meter($value=0, $text="display text", $attrb=null) Return string
function Progress($value=0, $max="100", $attrb=null) Return string
function Img($src=null, $attrb=null) Return string