PHPackages                             hexmakina/marker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. hexmakina/marker

ActivePackage

hexmakina/marker
================

Marker is an HTML generator

0.3.0(1y ago)2218[8 issues](https://github.com/HexMakina/Marker/issues)1mitPHPPHP &gt;=7.4

Since Aug 8Pushed 1y ago1 watchersCompare

[ Source](https://github.com/HexMakina/Marker)[ Packagist](https://packagist.org/packages/hexmakina/marker)[ RSS](/packages/hexmakina-marker/feed)WikiDiscussions main Synced today

READMEChangelog (8)Dependencies (1)Versions (9)Used By (1)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/5923a3ed30c934067dab042143d7faa7d00fa492d9d9ec071940b510f6ab0a5f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4865784d616b696e612f4d61726b65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/HexMakina/Marker/?branch=main)[![Maintainability](https://camo.githubusercontent.com/e16657e6074a55ef7a812ff7dd7af364a7b9735e21040002c133d1feebad860d/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f62326239353062366139323839396163633837362f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/HexMakina/Marker/maintainability)[![PSR-4 Compliant](https://camo.githubusercontent.com/2f4700086d2e2fe807bd70b7479ef20330e582cd6a594f203de5b49015d15ab8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d342d627269676874677265656e)](https://camo.githubusercontent.com/2f4700086d2e2fe807bd70b7479ef20330e582cd6a594f203de5b49015d15ab8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d342d627269676874677265656e)[![PSR-12 Compliant](https://camo.githubusercontent.com/f5517c4a8a2438b2152b62762e852385c588ff2c1d8a028ba56d0626e1151e94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d31322d627269676874677265656e)](https://camo.githubusercontent.com/f5517c4a8a2438b2152b62762e852385c588ff2c1d8a028ba56d0626e1151e94/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5053522d31322d627269676874677265656e)[![PHP 7.4 Required](https://camo.githubusercontent.com/f63521cc590300927c6f861886420f8b50b6dc4ebe47f4f7d2712e2a9b3b1dc6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342d627269676874677265656e)](https://camo.githubusercontent.com/f63521cc590300927c6f861886420f8b50b6dc4ebe47f4f7d2712e2a9b3b1dc6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d372e342d627269676874677265656e)[![Latest Stable Version](https://camo.githubusercontent.com/88c278d77d8b999f5d080ab1802767c8769e775bc39b0da8f23c025cedd47701/687474703a2f2f706f7365722e707567782e6f72672f6865786d616b696e612f6d61726b65722f76)](https://packagist.org/packages/hexmakina/marker)[![License](https://camo.githubusercontent.com/8e2f5b4f01895a084f16fc70f87ebcb00f7ce5f347cf2e09a5c4ba06f1a48ed1/687474703a2f2f706f7365722e707567782e6f72672f6865786d616b696e612f6d61726b65722f6c6963656e7365)](https://packagist.org/packages/hexmakina/marker)

Marker
======

[](#marker)

HTML Generation classes Hommage to Christian François Bouche-Villeneuve aka Chris Marker

Class Element
=============

[](#class-element)

The Element class provides a simple and useful implementation for creating, and generating valid HTML elements using PHP The \_\_toString() method of the Element class generates the HTML code for the element based on its tag, attributes, and content

Additionally, the Element class provides a static shorthand syntax, using \_\_callStatic() matching the name of the HTML Element to create

The first argument is the content, the second are the attributes

$abbr = Element::abbr('RTFM', \['title' =&gt; 'read the file manual'\]); $p = Element:p('You reading this means you know about '.$abbr); echo $p; //

You reading this means you know about RTFM

::span('inner text', \['class' =&gt; 'd-block'\]) ::p('lorem ipsum') ::img(null, \['src' =&gt; 'path/to/jpeg.png', alt='hyper descriptive', 'width' =&gt; 100, 'height'=&gt;100\]) ::a('click here', \['href' =&gt; 'url/to/destination', 'class' =&gt; 'nav-link'\]) ::a('anchor title', \['name' =&gt; 'anchor\_name'\])

Regarding the attributes array, the keys represent the attribute names, and the values represent the attribute values. If an attribute key is an integer, the corresponding attribute name and value are treated as a boolean attribute.

Example usage:

```
$element = new Element('section', 'Hello World!', [
    'id' => 'publication',
    'class' => 'container',
    'data-toggle' => 'modal',
    'data-target' => '#myModal',
]);

Hello World!

```

Or, with void element and boolean attributes:

$element = new Element('input', null, \[ 'type' =&gt; 'checkbox', 'checked', 'disabled', 'class' =&gt; 'checkbutton' \]);

Class WCAGElement
=================

[](#class-wcagelement)

This class extends the Element class and provides methods to enforce WCAG (Web Content Accessibility Guidelines) compliance for certain HTML elements.

Class Marker
============

[](#class-marker)

Class Form
==========

[](#class-form)

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~145 days

Recently: every ~137 days

Total

8

Last Release

720d ago

PHP version history (3 changes)0.0.1PHP &gt;=7.4

0.0.2PHP &gt;=7.0

0.1.1PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/973280baa800481e705055e3603932b782065471f88e7a3bedd350c3b3a8bcfd?d=identicon)[HexMakina](/maintainers/HexMakina)

---

Top Contributors

[![HexMakina](https://avatars.githubusercontent.com/u/20891495?v=4)](https://github.com/HexMakina "HexMakina (65 commits)")

---

Tags

htmlphpphp7

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/hexmakina-marker/health.svg)

```
[![Health](https://phpackages.com/badges/hexmakina-marker/health.svg)](https://phpackages.com/packages/hexmakina-marker)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
