<div>
  <strong>I Should Be Vertically Centered</strong>  
</div>

div {
  position: relative;
}

strong {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  translate: -50% -50%;
}





























/* Base Styles */
* {
  box-sizing: border-box;
}

html {
  font-family: Arial, Helvetica, sans-serif;
  height: 100%;
}

body {
  margin: 1em;
  display: grid;
  place-items: center;
  height: 100%;
}

div {
  aspect-ratio: 1 / 1;
  border: solid 2px red;
  width: 50%;
}

strong {
  border: solid 2px;
  padding: 0.5em 0.75em;
  text-align: center;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.