Back
How do I perform document formatting?
The HEADINGS TAG are placed within the 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: This is heading 1. As you can see the Heading text is surrounded by the 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 TAGS, like in the example below:
This is Heading 1
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 Tutorial
This is Heading 1
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 If you want to force a line break with no extra spaces between the lines, use the Line Break 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 TAG.
The code will look like this:
This line of text is centered
This is what your code should look like:
HTML Tutorial
This is Heading 1
This is the beginning of paragraph 1
You can also change the color of text within your page by using the < TAGS like the following example:
Type your text here
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:
Bold:
Italics:
This is what your code should look like:
HTML Tutorial
This is Heading 1
This is the beginning of paragraph 1
This text is a different color THIS TEXT IS BOLD
THIS TEXT IS UNDERLINED
THIS TEXT IS ITALIC
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.
|