You have a couple of problems.
#1) Your current code in your code pen shows:
text-aligh: center;<!--this has a typo - it is text-align not text-aligh -->
not what you show in your post above. You need to change your Codepen first.
#2) The reason the font of the h1 element stays white is because you used an in-line style of:
<h1 style="color: white">Daria Wójcicka</h1>
In-line styles take priority over css selector definitions. You need to remove the in-line style of style=“color:white” before the h1 selector definition will apply.
Apply what you have learned from my post to the h2 element.
EDIT: Also, since you are using Codepen, you need to move all the stuff between (but not including) the
</head> to Stuff for
<head> section of the HTML Pen Settings (see screenshot below).