How to Center Text without Center Tags

There are several ways to center text without using the <center> tag, which has been discontinued by the w3c. Below are two examples. View the html code for this page to see how these were done.

Centering text using in-line style sheet

Centering text using cascading style sheet in head of document