lecture.studio

A Marp title slide: lead class, no page number, background

A Marp title slide is the first slide with four directives: <!-- _class: lead --> to center it, <!-- _paginate: skip --> so it has no number and does not count, and <!-- _header: "" --> and <!-- _footer: "" --> to clear the running header and footer. The title is an # heading, the subtitle a ##, and the name and affiliation a plain line. A ![bg] image or _backgroundColor gives it a face.

This guide gives the slide, the variants (photo, colour, logo), the section divider that reuses the same idea, and the theme rules that make lead work when your theme has none.

The slide

---
marp: true
theme: default
paginate: true
header: "CS101 · Introduction to Operating Systems"
footer: "Week 5 · Scheduling"
---

<!-- _class: lead -->
<!-- _paginate: skip -->
<!-- _header: "" -->
<!-- _footer: "" -->

# Week 5: CPU scheduling

## CS101 · Introduction to Operating Systems

Dr. Jane Doe · Department of Computer Engineering · Fall 2026

lead centers the slide in the built-in themes. _paginate: skip is better than false because the first content slide then reads "1". The header and footer are cleared with an empty string, not removed from the deck.

With a photo

<!-- _class: lead -->
<!-- _paginate: skip -->
<!-- _color: white -->

![bg brightness:0.4](assets/campus.jpg)

# Week 5: CPU scheduling

The brightness filter darkens the photo so white text reads; blur:3px softens a busy image. Keep the photo relevant (the lab, the campus, the paper's figure), not decorative.

With a colour

<!-- _class: lead -->
<!-- _paginate: skip -->
<!-- _backgroundColor: #1d4ed8 -->
<!-- _color: white -->

Two directives, no image, prints well.

A small logo above the title, sized in the alt text:

![w:120](assets/university-logo.png)

# Week 5: CPU scheduling

If the logo should be on every slide, put it in the header or footer instead (header: "![w:28](assets/logo.png) CS101"), and keep the title slide clean.

The section divider

The same idea inside the deck, without the name line:

---

<!-- _class: divider -->
<!-- _paginate: skip -->

# 2 · Round-robin and the quantum

with, in the theme:

section.divider { justify-content: center; }
section.divider h1 { font-size: 56px; text-align: center; }

Dividers make a forty-slide lecture navigable and give the presenter view a landmark. _paginate: skip keeps them out of the count, so "slide 12" still means the twelfth content slide.

If your theme has no lead class

Define it:

section.lead { justify-content: center; text-align: center; }
section.lead h1, section.lead h2, section.lead p { text-align: center; }
section.lead h1 { font-size: 56px; }
section.lead h2 { font-size: 30px; font-weight: normal; color: #737373; }

The theme builder includes lead and divider when you tick them; the templates all start with the title slide above.

What goes on it

Title, course or venue, your name, affiliation, date. A talk adds the event; a lecture adds the week and topic. Not on it: an agenda (next slide), a quotation (a divider later), your email in 12-point type (the closing slide). The title slide is on screen while people sit down; it should tell them they are in the right room.

FAQ

How do I make a title slide in Marp?

<!-- _class: lead --> for centering, <!-- _paginate: skip --> to drop the number, and _header: "" / _footer: "" to clear the running lines; then the title as # and the subtitle as ##.

How do I remove the page number from the first slide?

<!-- _paginate: skip --> (hidden and uncounted) or <!-- _paginate: false --> (hidden, counted).

How do I add a background image to the Marp title slide?

![bg](image.jpg) on that slide; add brightness:0.4 to darken it and <!-- _color: white --> for the text.

What is the lead class in Marp?

A class the built-in themes define for a centered slide; apply it with <!-- _class: lead -->. Custom themes define their own.