Last Updated | | Ratings | | Unique User Downloads | | Download Rankings |
2024-01-09 (4 days ago) | | Not enough user ratings | | Total: 220 This week: 2 | | All time: 8,254 This week: 220 |
|
Description | | Author |
This class can generate HTML5 documents programmatically.
It provides an extensive list static functions that can take a few parameters and generate HTML open and close tags including some that were introduced in HTML5.
Currently it supports tags for document head and body, paragraphs and character formatting, links, forms, lists, embedding audio and video, JavaScript tags, etc.. | |
|
Example
<?php
/*
* HTML Model Constructor
* Author: https://github.com/ManuDavila
* Site: http://jquery-manual.blogspot.com
*/
require "ModelHtml/ModelHtml.php";
echo HTML::add("<!DOCTYPE HTML>\n");
echo HTML::open_html();
echo HTML::open_head();
/* Add slash alternative:
echo HTML::meta("title", "HTML Model Constructor", "/");
RESULT: <meta name='title' content='HTML Model Constructor'/>
*/
echo HTML::favicon("images/php.ico");
echo HTML::charset("UTF-8");
echo HTML::title("HTML Model Constructor");
echo HTML::meta("viewport", "width=device-width");
echo HTML::meta("title", "HTML Model Constructor");
echo HTML::meta("description", "This class can generate HTML5 documents programmatically.");
echo HTML::meta("keywords", "html, html5, form, php, model, class");
echo HTML::meta("robots", "All");
echo HTML::script("http://code.jquery.com/jquery-1.11.1.min.js");
echo HTML::link_style("css/index.css");
echo HTML::open_script();
//Your Javascript code here
echo HTML::close_script();
echo HTML::open_style();
//Your CSS code here
echo HTML::close_style();
echo HTML::close_head();
echo HTML::open_body();
echo HTML::open_header();
echo HTML::open_div(array("class" => "container"));
echo HTML::h1("HTML Model Constructor", array("class" => "title"));
echo HTML::p("This class can generate HTML5 documents programmatically.
It provides an extensive list static functions that can take a few parameters and generate HTML open and close tags including some that were introduced in HTML5.
Currently it supports tags for document head and body, paragraphs and character formatting, links, forms, lists, embedding audio and video, JavaScript tags, etc..");
echo HTML::close_div();
echo HTML::close_header();
echo HTML::open_main();
echo HTML::open_div(array("class" => "container"));
echo HTML::h3("Methods from HTML class:");
echo HTML::open_ul(array("id" => "list"));
foreach (get_class_methods('HTML') as $val)
{
echo HTML::add_li($val);
}
echo HTML::close_ul();
echo HTML::close_div();
echo HTML::close_main();
echo HTML::open_footer();
echo HTML::open_div(array("class" => "container"));
echo HTML::open_center();
echo HTML::small("Author: " . HTML::a("https://github.com/ManuDavila", "ManuDavila", array("target" => "_blank")));
echo HTML::close_center();
echo HTML::close_div();
echo HTML::close_footer();
echo HTML::close_body();
echo HTML::close_html();
|
Details
<header>
<div class='container'>
<h1 class='title'>HTML Model Constructor</h1>
<p>This class can generate HTML5 documents programmatically.
It provides an extensive list static functions that can take a few parameters and generate HTML open and close tags including some that were introduced in HTML5.
Currently it supports tags for document head and body, paragraphs and character formatting, links, forms, lists, embedding audio and video, JavaScript tags, etc..</p>
</div>
</header>
<main>
<div class='container'>
<h3>Methods from HTML class:</h3>
<ul id='list'>
<li>add</li>
<li>add_audio</li>
<li>add_li</li>
<li>add_option</li>
<li>add_row</li>
<li>addslashes</li>
<li>add_video</li>
<li>b</li>
<li>blockquote</li>
<li>br</li>
<li>button</li>
<li>charset</li>
<li>checkbox</li>
<li>cite</li>
<li>close_address</li>
<li>close_article</li>
<li>close_aside</li>
<li>close_audio</li>
<li>close_body</li>
<li>close_canvas</li>
<li>close_center</li>
<li>close_details</li>
<li>close_div</li>
<li>close_figure</li>
<li>close_footer</li>
<li>close_form</li>
<li>close_head</li>
<li>close_header</li>
<li>close_html</li>
<li>close_main</li>
<li>close_nav</li>
<li>close_section</li>
<li>close_script</li>
<li>close_select</li>
<li>close_style</li>
<li>close_table</li>
<li>close_ul</li>
<li>close_video</li>
<li>color</li>
<li>date</li>
<li>datetime</li>
<li>datetime_local</li>
<li>dialog</li>
<li>entities</li>
<li>entities_decode</li>
<li>div</li>
<li>email</li>
<li>favicon</li>
<li>figcaption</li>
<li>file</li>
<li>h1</li>
<li>h2</li>
<li>h3</li>
<li>h4</li>
<li>h5</li>
<li>h6</li>
<li>hidden</li>
<li>hr</li>
<li>iframe</li>
<li>image</li>
<li>input</li>
<li>i</li>
<li>label</li>
<li>a</li>
<li>link_style</li>
<li>mark</li>
<li>meta</li>
<li>month</li>
<li>number</li>
<li>object</li>
<li>open_address</li>
<li>open_article</li>
<li>open_aside</li>
<li>open_audio</li>
<li>open_body</li>
<li>open_canvas</li>
<li>open_center</li>
<li>open_details</li>
<li>open_div</li>
<li>open_figure</li>
<li>open_footer</li>
<li>open_form</li>
<li>open_head</li>
<li>open_header</li>
<li>open_html</li>
<li>open_main</li>
<li>open_nav</li>
<li>open_section</li>
<li>open_script</li>
<li>open_select</li>
<li>open_style</li>
<li>open_table</li>
<li>open_ul</li>
<li>open_video</li>
<li>p</li>
<li>password</li>
<li>pre</li>
<li>progress</li>
<li>radio</li>
<li>range</li>
<li>script</li>
<li>search</li>
<li>small</li>
<li>span</li>
<li>specialchars</li>
<li>specialchars_decode</li>
<li>strong</li>
<li>submit</li>
<li>summary</li>
<li>tel</li>
<li>text</li>
<li>textarea</li>
<li>title</li>
<li>time</li>
<li>token</li>
<li>url</li>
<li>url_encode</li>
<li>url_dedoce</li>
<li>week</li>
</ul>
</div>
</main>
<footer>
<div class='container'>
<center>
<small>Author: <a href='https://github.com/ManuDavila' target='_blank'>ManuDavila</a>
</small>
</center>
</div>
</footer>
|
Applications that use this package |
|
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.