fernandovaller / html-tags-generator
简单的HTML标签生成器
v1.2
2022-01-04 18:46 UTC
README
简单的HTML标签生成器
安装
使用以下命令安装最新版本
$ composer require fernandovaller/html-tags-generator "1.*"
基本用法
<?php use FVCode\Html\Html; require __DIR__ . '/vendor/autoload.php'; echo Html::a('link', [ 'href' => 'https://www.google.com' ]); //Out: <a href="https://www.google.com">link</a>
表格
<?php use FVCode\Html\Html; require __DIR__ . '/vendor/autoload.php'; $table['thead'] = ['th 1', 'th 2']; $table['tbody'][] = ['td 1', 'td 2']; $table['tbody'][] = ['td 3', 'td 4']; $table['tfoot'] = ['td 1', 'td 2']; echo Html::table($table, ['table' => [ "border" => 1 ]]);
参考方法
comment h1 h2 h3 h4 h5 h6 p b strong i em mark small del ins sub sup blockquote q abbr address cite bdo a img picture figure figcaption ul ol dl li dt dd header footer main nav div article section aside fieldset legend span iframe table thead tbody tfoot tr td th