PHPackages                             8fold/php-html-spec - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. 8fold/php-html-spec

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

8fold/php-html-spec
===================

The HTML and ARIA-HTML specifications as structured data

0.0.5(4y ago)03341MITHTMLPHP ^7|^8.0

Since Sep 29Pushed 4y ago1 watchersCompare

[ Source](https://github.com/8fold/php-html-spec)[ Packagist](https://packagist.org/packages/8fold/php-html-spec)[ GitHub Sponsors](https://github.com/8fold)[ GitHub Sponsors](https://github.com/joshbruce)[ RSS](/packages/8fold-php-html-spec/feed)WikiDiscussions main Synced today

READMEChangelog (5)Dependencies (2)Versions (6)Used By (1)

8fold HTML Spec
===============

[](#8fold-html-spec)

The mission here is to present the [Living HTML Specification](https://html.spec.whatwg.org/) as structured, and interconnected data.

The structured data is placed in a folder for the type of structured data used (`json`, for example). It's important to note that everything withing the folder for the structured data is automatically generated; therefore, no guarantee is provided regarding the accuracy and correcting the issue may require correcting an issue in the specification itself.

The information architecture of the `html` directory matches the URL of the documentation provided in [w3c/elements-of-html](https://raw.githubusercontent.com/w3c/elements-of-html/master/elements.json).

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

[](#installation)

`composer require 8fold/html-spec-structured`

Usage
-----

[](#usage)

### Raw data

[](#raw-data)

The compiled data from the writer scripts is stored in the `/json` directory, giving users direct access to the raw data using whatever interface they deem suitable.

### PHP Reader classes

[](#php-reader-classes)

The reader classes provide an API and lightweight ORM solution for retrieving data and are regularly refined to improve and ensure performance.

```
HtmlIndex::all()->elementNamed("h1");
```

### PHP Writer classes

[](#php-writer-classes)

Because the data are collected across multiple documents, in multiple repositories, across multiple organizations, the writing scripts are very utilitarian and considered "throw away." They are minimally optimized for querying the documents and saving the subsequent data to files. Further, they inherit from the reader classes and are, therefore, completely decoupled from the user-oriented capabilties.

Details
-------

[](#details)

### Project data structure

[](#project-data-structure)

- `html.json`: Index of HTML elements.
- `html-attributes.json`: Index of defined attributes, events, and ARIA attributes.
- `html-aria-roles.json`: Index of defined role attribute values. Debating.

### Data collection

[](#data-collection)

- The list of HTML elements is pulled from the w3c [Elements of HTML](https://raw.githubusercontent.com/w3c/elements-of-html/master/elements.json) repositiory. Note: If the element is not listed here, will not be listed anywhere else, even if referenced in other resources.
- The list of non-ARIA HTML attributes and element details are pulled from the WHATWG [HTML Living Standard](https://raw.githubusercontent.com/whatwg/html/master/source).
    - Note: `role` is not considered an attribute in that it is not listed in the attributes table; therefore, it is injected as a global attribute after the initial set is complete.
- The list of ARIA attributes and HTML element roles is pulled from the w3c [HTML ARIA](https://raw.githubusercontent.com/w3c/html-aria/gh-pages/index.html) documentation.
- The ATRIA attribute categories are pulled from a local copy of the w3c HTML ARIA 1.1 recommendation available in the local folder of this repository.

ARIA seems to be the least consolidated and most volatile from a format perspective; however, it may become easier to aggregate and compile as time progresses.

Other
-----

[](#other)

### Versioning

[](#versioning)

As this package relays on time-sensitive, not functionality-sensitive details, versioning is time based using an ISO standard; therefore, semantic versioning `[major].[minor].[patch]` becomes `[year].[month].[day]`.

- year: represents the four-digit year the compiling scripts were run.
- month: representing the two-digit month the compiling scripts were run.
- day: represents the two-digit day the compiling scripts were run.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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 ~89 days

Total

5

Last Release

1747d ago

PHP version history (3 changes)0.0.1PHP ~7

0.0.3PHP ~7|^8.0

0.0.5PHP ^7|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ff7aa36dc04c5b535cd71eadbf66038401edde0c9dfaa688bec4fc16c6d7e8b?d=identicon)[eightfold](/maintainers/eightfold)

---

Top Contributors

[![joshbruce](https://avatars.githubusercontent.com/u/15252830?v=4)](https://github.com/joshbruce "joshbruce (30 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/8fold-php-html-spec/health.svg)

```
[![Health](https://phpackages.com/badges/8fold-php-html-spec/health.svg)](https://phpackages.com/packages/8fold-php-html-spec)
```

###  Alternatives

[dillingham/nova-errors

Display errors at the top of your forms

1456.7k](/packages/dillingham-nova-errors)[rias/statamic-link-it

Link to anything and everything!

1085.9k](/packages/rias-statamic-link-it)

PHPackages © 2026

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