Aprende CSS básico construyendo un menú de cafetería - Paso 13

Tell us what’s happening:

Describe tu problema en detalle aquí.

Cafe Menu

h1 {
text-align: center;
}
h2 {
text-align: center;
}
p {
text-align: center;
}

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Cafe Menu</title>

<!-- User Editable Region -->

    <style>
      h1 {
        text-align: center;
      }
      h2 {
        text-align: center;
      }
      p {
        text-align: center;
      }
    </style>

<!-- User Editable Region -->

  </head>
  <body>
    <main>
      <h1>CAMPER CAFE</h1>
      <p>Est. 2020</p>
      <section>
        <h2>Coffee</h2>
      </section>
    </main>
  </body>
</html>

Your browser information:

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Aprende CSS básico construyendo un menú de cafetería - Paso 13

como todos los selectores usan la misma regla, text-align: center;, podemos simplificarlo y unir los 3 selectores en uno solo, y así no tener que repetir codigo.

      h1,{
        text-align: center;
      }
      h2 {
        text-align: center;
      }
      p {
        text-align: center;
      }

aqui está el ejemplo de como combinar múltiples selectores

selector1, selector2 {
  property: value;
}