I see a lot of problems, including missing closing tags and missing body tag. Additionally, your top margin, being negative, will force the text be above of the screen; so you won't see it.
Peter's comment above will give you the answer, but, my suggestion to you is start from the beginning and read a beginner's tutorial on CSS (
CSS Tutorial[
^]). It'll take an hour and about 3/4 through, you'll get into layouts (
CSS Layout - Horizontal & Vertical Align[
^]).
<!DOCTYPE html>
<html>
<head>
<style>
.center{margin: auto; width: 60%; border: 3px solid #000; padding: 10px;}
.center-text{text-align: center;}
</style>
</head>
<body>
<div class="center">
<p>The div is centered, but the text is not.</p>
<h4 class="center-text">This is centered text.</h4>
</div>
</body>
</html>