Using the Center Command


The center tag can be used to center a single line of text, an entire block or paragraph of text, or a whole page. The center tag, <center>, can also be used to center any other information that appears on a page. You must use the </center> tag to end the centering.

<html>

<head>
<TITLE>Title</TITLE>
</head>
<body>
<h1>This can be your main Topic</h1>

<center>
<h2>This is a Smaller Header</h2><p>
This example shows how the center tag can be used to center a line or
a whole block or paragraph of text.
</center>

</body>
</html>

Display this document


Return to HTML Tutorial Menu