Skip to content
BENIBIX Learn

Front Matter

Development📄 Files & FormatsText

Also known as YAML Front Matter, Frontmatter

A block of settings at the top of a file, between two lines of dashes. It holds the title, date and tags.

Think of it like

Think of it like the sticky note on top of a homework sheet. It holds the name and date, not the answers.

Example

Lucy writes a blog post in Markdown. Its front matter gives the title and the date, and her site builder puts both on the page.

Why it matters

It keeps the facts about a page in the same file as the page. Nothing gets lost in a separate list.

Definition

Front matter is a small block of settings at the very top of a text file. It sits between two lines of three dashes. Inside, it is usually written in YAML, as names and values. It holds facts about the file, like its title, date or tags. Site builders and note apps read it, and the rest of the file is the content. It is most common in Markdown files.

Example code

markdown
---
title: My First Post
date: 2026-03-07
tags: [travel, food]
---

# My First Post
The lines between the two sets of dashes are settings. The page itself starts below them.
The settings sit on top, between the dashes. The page people read comes after them.

Common mistake

Putting a blank line or any text above the first three dashes. The front matter must be the very first thing in the file.

Key takeaways

  1. 1
    Top of the file. It must come before anything else.
  2. 2
    Between dashes. Three dashes open it and close it.
  3. 3
    Facts, not content. The title, date and tags live here.

Learn it properly