Categories:
Main Questions
Website Creation
Editing Images
Editing HTML Code
Domain Names
User Registration
Hosting Plans
Making Payments
User Interface
Site Promotion
Affiliate Program
Search: Have a question? Find an answer fast.
(Example: change design)

Back

What is document formatting?

The HEADINGS TAG <H></H> are placed within the <BODY></BODY> TAGS. There are six sizes you can choose from.

This is Heading 1
This is Heading 2
This is Heading 3
This is Heading 4
This is Heading 5
This is Heading 6

This is what the code looks like: <H1>This is heading 1</H>. As you can see the Heading text is surrounded by the <H></H> TAGS. To change the size of the Heading simply replace the number 1 with the corresponding number of the heading size desired. You can center your Heading by simply nesting it inside a set of <CENTER></CENTER> TAGS, like in the example below:

<CENTER><H1>This is Heading 1</H></CENTER>

If you choose not to center your Headings, the browser will line them up to its default settings (probably left.) Using the CENTER TAGS you can also center text or images. This is what you code should look like (if you started with the Getting started lesson):

<HTML>
<HEAD>
<TITLE>HTML Tutorial</TITLE>
</HEAD>
<BODY>
<CENTER> <H1>This is Heading 1 </H1> </CENTER>
</BODY>
</HTML>

Once you put your heading into the document, you will want to have a paragraph or two to describe your web site. To do this just type any text that you want underneath your heading. This would be the first paragraph to appear within the BODY of the document. The text will wrap with a single space between each word, regardless of how you lay out the document or how many spaces you put between the words. To start a new paragraph you will need to use the paragraph symbol <P> If you want to force a line break with no extra spaces between the lines, use the Line Break <BR> TAG. This is useful when you want to end a line before it reaches the end of the page. To center a paragraph use the <P ALIGN=CENTER> TAG. The code will look like this:

<P ALIGN=CENTER>This line of text is centered </P> 

This is what your code should look like:

<HTML>
<HEAD>
<TITLE>HTML Tutorial</TITLE>
</HEAD>
<BODY>
<CENTER> <H1>This is Heading 1 </H1> </CENTER>
<P ALIGN=CENTER>This is the beginning of paragraph 1</P>
</BODY>
</HTML>
You can also change the color of text within your page by using the <FONT COLOUR>< TAGS like the following example:
<FONT COLOUR="#0000FF">Type your text here</FONT>

Besides color there are many things you can do improve your text. Just as a normal word-processing program, you can underline text, make it bold, or italicize it. Here are the HTML TAGS for these commands. Simply place the tags around whatever text you want to affect.

Underline: <U></U>
Bold: <B></B>
Italics: <I></I>

This is what your code should look like:

<HTML>
<HEAD>
<TITLE>HTML Tutorial</TITLE>
</HEAD>
<BODY>
<CENTER> <H1>This is Heading 1 </H1> </CENTER>
<P ALIGN=CENTER>This is the beginning of paragraph 1<BR>
<FONT COLOUR=#0000FF">This text is a different color </FONT> </BR> <B>THIS TEXT IS BOLD </B><BR>
<U>THIS TEXT IS UNDERLINED </U><BR>
<I>THIS TEXT IS ITALIC </I><BR>
</P>
</BODY>
</HTML>

Once again its time to try this code on your own. Try changing the color of the background, text, and headings of your page. You might want to experiment with different heading sizes, text colors, and paragraph locations. Remember you are learning HTML and only with practice you will become a true master!

TIP: If you want to leave a comment in the HTML code for your own reference which will not show up on the browser's window, enclose your text message within the <!-->Put Your Comment Here<--> TAG.
Copyright © 2003, Artvertex, Inc. All design templates are ownership of Artvertex, Inc.