Text formatting, in other words presenting the text on an HTML page in a desired manner, is an important part of creating a web page. Let us understand how we can lay out of text controls its appearance on a page.


Headers are used to specify the headings of sections or sub-sections in a document. Depending on the desired size of the text, any of six available levels (<H1> to <H6>) of headers can be used. The usage and varying size of the rendered text depending upon the tag used. See the figure below.

<H1> Header Level 1</H1>
<H2> Header Level 2</H2>
<H3> Header Level 3</H3>
<H4> Header Level 4</H4>
<H5> Header Level 5</H5>
<H6> Header Level 6</H6>


There is no predefined sequence for using the different levels of the header tags nor any restrictions on which one can be used. So the user has the option of using any level of header tag anywhere in the document. If you want to center text on a page, use the CENTER tag. The text written between <CENTER> and </CENTER> tag gets aligned in the center of the HTML page. As seen in Figure above, the maximum siz of the text is displayed using the <H1> tag. So the size goes in decreasing order with the increasing order of the level (i.e. From <H1> to <H6>).