Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change title size and color in Quarto (html output)

I have a quarto file with an HTML rendering, and I want to change the size and color of the title, how should I proceed? Minimal example:

---
title: "Cars"
format: 
  html
---

## MTCars
```{r}
head(mtcars)
```
like image 439
Maël Avatar asked Sep 11 '25 19:09

Maël


1 Answers

You can use css directly in your code; specify .title to apply your changes to the title only.

With font-size, you can change the size of the title, and with color you can change the color. You can also change the style with font-style, the family (e.g. Arial) with font-family, and the variant with font-variant.

---
title: "Cars"
format: 
  html
---

```{css, echo=FALSE}
.title {
  font-size: 100px;
  font-style: italic;
  color: blue;
  font-family: Arial;
  font-variant: small-caps;
}
```

## MTCars
```{r}
head(mtcars)
```

enter image description here

like image 157
Maël Avatar answered Sep 14 '25 11:09

Maël