Modular Markup (MML)

A meaning-first markup language that remains readable as plain text.

Modular Markup (MML) is an experimental semantic markup language designed around a simple idea:

Documents should describe meaning, not formatting.

Unlike Markdown, which relies on symbolic shortcuts, or HTML, which mixes semantic and presentational concerns, MML focuses on explicit semantic structures that are understandable to both humans and machines.

The source document should remain readable as plain text while compiling into a fully structured document tree.


Goals

Core Philosophy

MML is built around semantic objects rather than formatting instructions.

For example:

argument
claim
evidence
timeline
event
comparison
entity
image
caption

represent meaningful concepts.

By contrast, generic containers such as:

<div>
<span>

have no direct equivalent in MML.

Every element should represent something recognizable and meaningful.


Syntax

Opening Tags

Opening tags are written as plain keywords.

claim
section title="Background"

Text Content

Anything that is not recognized as valid markup is treated as text.

claim

Arguments are not always unhealthy.


The word "Arguments" is content, not a tag.


Validation

MML validates semantic structure, not just syntax.

Example:

evidence
The final output is already HTML.

Produces:

Error:
evidence requires parent claim.

Valid:

argument

claim

evidence
The final output is already HTML.


Automatic Text Nodes

Plain text is automatically wrapped in text nodes.

Source:

claim
Markdown is unnecessary.

Internal representation:

<claim>
  <text>Markdown is unnecessary.</text>
</claim>

Authors rarely need to write explicit text tags.


Semantic Schemas

Argument

argument
└── claim
    └── evidence

Rules:


Timeline

timeline
├── year-start
├── event
└── year-end

Rules:


Calendar

calendar
├── year-month
└── event

Rules:


Comparison

Before / After

comparison
├── before
└── after

Entity Comparison

comparison
├── entity
│   └── unique
├── entity
│   └── unique
└── shared

Scenario Comparison

comparison
├── scenario
│   └── conditions
└── scenario
    └── conditions

Media

media
├── image
├── video
├── audio
├── caption
└── source

Rules:


Design Principles

Text Wins

If something is not valid markup, it is text.

The parser should never aggressively reinterpret ordinary writing as structure.


Singular Elements

Element names are singular.

Valid:

claim
event
entity
image

Invalid:

claims
events
entities
images

Semantic Necessity

A tag should only exist if it represents a meaningful concept that cannot already be expressed using existing tags.


Project Status

Early specification and parser prototype.

The language is actively evolving and many schemas, validation rules, and compilation targets remain under discussion.


CONTRIBUTE

Have an issue? GET IN TOUCH.

Have an idea for a tag we should add? SUBMIT A TAG here.

Do you have a more advanced tag idea? SUBMIT A SCHEMA instead!


SUPPORT

You can read the full SPEC here.

Try the PARSER.


TAGS

Here is the list of TAGS.

Looking for the SHORTHAND version?

Check out a list of PROPOSED TAGS.

Curious about how the tags can be used together? Find out here ---> DEPENDENCIES.

Did you know that you can use the tag CHAPTER instead of SECTION, if you want? SYNONYMS make it fine to replace one with the other!

#readme #markup #grammar #syntax #semantic #data-structure #schemas #official #tags