body {
    width: 500px;
    height: 1900px;
    margin: 0 auto;
    /* position: relative; */
    /* Lo cual indica con referencia a él tiene que colocarse en una posicion absoluta los elementeos anidados */
}

p {
    background: aqua;
    border: 3px solid blue;
    padding: 10px;
    margin: 10px;
}

span {
    background: red;
    border: 1px solid black;
}

/* ---- Static positioning ---- */
/* .positioned {
    position: static;
    background: yellow;

} */

/* ---- Relative positioning ---- */

/* .positioned {
    position: relative;
    background: yellow;
    top: 30px;
    left: 30px;
} */

/* ----- Absolute positioning ----- */
/* .positioned {
    position: absolute;
    background: yellow;
    top: 30px;
    left: 30px;

} */

/* ----- Introducing z-index ----- */
/* p:nth-of-type(1) {
    position: absolute;
    background: lime;
    top: 10px;
    right: 30px;
    z-index: 1;
} */

/* ----- Fixed positioning ------ */
h1 {
    position: fixed;
    top: 0;
    width: 500px;
    margin-top: 0;
    background: rgb(255, 255, 255);
    padding: 10px;
  }

  p:nth-of-type(1) {
    margin-top: 60px;
  }


/*   ----- Sticky positioning ---- */

.positioned {
    position: sticky;
    top: 30px;
    left: 30px;
  }

  dt {
    background-color: black;
    color: white;
    padding: 10px;
    position: sticky;
    top: 0;
    left: 0;
    margin: 1em 0;
  }
  