So now we are ready to start to put some information onto our page and a heading seems to be a good place to start as this will be the first thing the visitors to your site will see. In (X)HTML there are 6 predefined headings ranging from 1 to 6 with 1 been the biggest through to 6 the smallest. The text you want in your heading just goes inside the headings tags as below:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>My First Page</title>
</head>
<body>
<h1>This is a level one Heading</h1>
<h2>This is a level two Heading</h2>
<h3>This is a level three Heading</h3>
</body>
<html>
You can use the heading tags throughout your page not just for main headings, but sub headings or even just text that you want to emphasize. Using the heading tag cause's a line break and line spacing on the line below. You can also change the style of the headings such as the size and color etc using cascading style sheets.
Lets say we want to make our h2 heading 20pt and change the color to red then we could embed a style into the h2 tag to change these values of the heading as so...
<body>
<h2 style="color:red; font-size:20pt;">This is a level two Heading</h2>
</body>
If you are reading this then you probably don't no much about style sheets and you would be best working your way through the (X)HTML tutorials first, but if you just cant wait then feel free to check out the Cascading Style Sheet section.
The paragraph tag is likely to be one of your most used tags when building your web site especially if you have bundles of information to display. All paragraphs should be opened with <p> and closed with </p> to ensure that all your paragraph text is formatted the same.
It is possible to use a style sheet to style the text in your paragraphs throughout your whole page but here we will use a little embedded style to indent just the paragraph we are working with.
<body>
<p style="text-indent:30px; color:blue;">
This is a paragraph with an indent of 30px and blue text,
I have put a line break here so you can compare the two lines to easily view the indent.
</p>
</body>