PHPackages                             decodelabs/elementary - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. decodelabs/elementary

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

decodelabs/elementary
=====================

Shared base markup handling library

v0.6.5(7mo ago)211.5k↓100%12MITPHPPHP ^8.4CI passing

Since Mar 30Pushed 5mo ago2 watchersCompare

[ Source](https://github.com/decodelabs/elementary)[ Packagist](https://packagist.org/packages/decodelabs/elementary)[ RSS](/packages/decodelabs-elementary/feed)WikiDiscussions develop Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (39)Used By (2)

Elementary
==========

[](#elementary)

[![PHP from Packagist](https://camo.githubusercontent.com/f04bb1b5b20248e1a207cd0f0f8bf0931d32a3c5612a2553c5b38fbefd589601/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6465636f64656c6162732f656c656d656e746172793f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/elementary)[![Latest Version](https://camo.githubusercontent.com/7088b53c4c72d9d1d8495ed220bafe0c4000ce1e38cdda20300ae06813813c3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6465636f64656c6162732f656c656d656e746172792e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/elementary)[![Total Downloads](https://camo.githubusercontent.com/695815659717507239b367948aea9dfb42db2b4d3208390c6052bfe5cd0185ba/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6465636f64656c6162732f656c656d656e746172792e7376673f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/elementary)[![GitHub Workflow Status](https://camo.githubusercontent.com/634d59cba80c123d64a03bfb7a9c373c3970a7d12deadee986d2f08a2803235f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6465636f64656c6162732f656c656d656e746172792f696e746567726174652e796d6c3f6272616e63683d646576656c6f70)](https://github.com/decodelabs/elementary/actions/workflows/integrate.yml)[![PHPStan](https://camo.githubusercontent.com/e25c14ce011edabdd0fbd2e10415b41cc5d66ed11ef3e5b7edd074c5bdd35a2d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d656e61626c65642d3434434331312e7376673f6c6f6e6743616368653d74727565267374796c653d666c6174)](https://github.com/phpstan/phpstan)[![License](https://camo.githubusercontent.com/fdf79267ffd254c41e72056a151b2927af19d1c7953baa67e7ce36a0b0f0c5f9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6465636f64656c6162732f656c656d656e746172793f7374796c653d666c6174)](https://packagist.org/packages/decodelabs/elementary)

### Shared base markup handling library for PHP.

[](#shared-base-markup-handling-library-for-php)

Elementary is a middleware library designed to provide tools for building tag-base manipulation systems.

---

Installation
------------

[](#installation)

This package requires PHP 8.4 or higher.

Install via Composer:

```
composer require decodelabs/elementary
```

Usage
-----

[](#usage)

This library should be used as the basis for *other* markup / tag handling libraries, and is not intended for direct end-user interaction.

Other Decode Labs packages using this library:

- [**Tagged** - HTML generator](https://github.com/decodelabs/tagged)
- [**Exemplar** - XML manipulator](https://github.com/decodelabs/exemplar)

Licensing
---------

[](#licensing)

Elementary is licensed under the MIT License. See [LICENSE](./LICENSE) for the full license text.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance73

Regular maintenance activity

Popularity27

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 99.5% 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 ~45 days

Recently: every ~29 days

Total

37

Last Release

217d ago

PHP version history (4 changes)v0.1.0PHP ^7.2|^8.0

v0.2.0PHP ^8.0

v0.2.6PHP ^8.1

v0.4.2PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a241d64d12b3b5ee94197862ec1ec30b82ed2efa34a0cd7f4c3565a021daddd?d=identicon)[betterthanclay](/maintainers/betterthanclay)

---

Top Contributors

[![betterthanclay](https://avatars.githubusercontent.com/u/1273586?v=4)](https://github.com/betterthanclay "betterthanclay (183 commits)")[![szepeviktor](https://avatars.githubusercontent.com/u/952007?v=4)](https://github.com/szepeviktor "szepeviktor (1 commits)")

---

Tags

markupphptagxmlhtmlmarkup

### Embed Badge

![Health badge](/badges/decodelabs-elementary/health.svg)

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

###  Alternatives

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M226](/packages/masterminds-html5)[imangazaliev/didom

Simple and fast HTML parser

2.2k2.3M64](/packages/imangazaliev-didom)[querypath/querypath

HTML/XML querying and processing (like jQuery)

8197.0M27](/packages/querypath-querypath)[rumenx/php-sitemap

Framework-agnostic Sitemap generator for PHP, Laravel, and Symfony.

1.3k15.1k1](/packages/rumenx-php-sitemap)[rct567/dom-query

DomQuery is a PHP library that allows easy 'jQuery like' DOM traversing and manipulation

134261.0k4](/packages/rct567-dom-query)[gravitypdf/querypath

PHP library for HTML(5)/XML querying (CSS 4 or XPath) and processing (like jQuery) with PHP 7.1 to 8.5 support

281.2M1](/packages/gravitypdf-querypath)

PHPackages © 2026

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