1. Go to this page and download the library: Download wert1209yt/htmlman library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wert1209yt / htmlman example snippets
Man::init(); // Init will add all base HTML5 elements classes
HtmlMan::register([
'name' => 'Card',
'tag' => 'div', // Or any html tag (WebComponents support)
'class' => 'card',
'id' => '123',
'style' => [
'background-color' => '#ffffff',
'border' => '1px solid #ddd'
], // Or string 'background-color: #ffffff; border: 1px solid #ddd'
// Element structure
'structure' => new Main([
(new Div([
new P() // Will put content there
]))->class('card-body')
])
]);