Vertically align text in div

How do I vertically align text in a div?

The best choice for vertically aligning a text in a div is to use the display: flex property on the parent div. Doing that, you can then use the align-items: center attribute to the same element. That way everything inside that div will come to center on the vertical axis. 

You can also use the justify-content: center attribute in order to align the div on the horizontal axis. Keep in mind that justify-content: center is not equivalent  to text-align: center. The first aligns the hole div when the second aligns the text inside it.