The best way to learn HMTL is to study how other people use it. For example, in Internet Explorer 8, you can view the source of a web page by selecting View Source from the Page menu.
Headings are used to divide sections of text in a hierarchical manner. HTML defines six levels of headings, ranging from
<h1> for the most important to
<h6> for the least important:
<h1>Heading 1</h1> <h2>Heading 2</h2> <h3>Heading 3</h3> <h4>Heading 4</h4> <h5>Heading 5</h5> <h6>Heading 6</h6>
Figure 2-1 shows each of the six levels of headings. An important thing to notice about headings is that they always appear on their own line. They are considered block-level elements.
Once you have your added your headings, it's time to add some text. Text is divided into paragraphs, and the HTML tag for paragraph is
<p>This is my first paragraph. It is a very short paragraph by design.</p>
The paragraph element automatically creates some space before and after itself, therefore it is also a block-level element. Many people are tempted to use the line break element (
<br />) to create paragraphs. They do this by placing two line breaks in a row. However, you should avoid this temptation. If you separate your paragraphs using line breaks, you will not be able ...