BEFORE YOU BEGIN
6 About Proper HTML Coding
2 Use HTML Tags
9 Add and Format Text
25 Add Text and Graphics to the Page
43 Add Text and Links
As you learned in Chapter 2, "The Basics of HTML," HTML is a language of nested tags and everything that shows up on the page has to be in a containing tag. When you type text, by default it goes into the <body> tag, which is the highest-level container for content on your page. This isn't considered good for a well-designed page because the structure of the page is important to the browser. Generally, paragraphs should be enclosed in <p> tags, which give the text the correct structure and which create a vertical break between paragraphs.
Other tags are important to indicate the heading level for a block of text. If you are working on a longer document, you will have heading levels that help you organize. You might have three levels of information in your page. In HTML, you would use an <h1> for the top-level heading, then an <h2> , and then for the smallest subsections, you would use an <h3> .
Keeping these heading levels provides a structure or tree of your information.
Open Your Sample File
Open the file you created in Chapter 7, "Getting Started with Netscape Composer." If you haven't completed that step, you can create a new file to use and add some text to work with.
Format Your Text As a Paragraph
The text is converted from <body> text, which is unstructured, into <p> text, which has line breaks between each paragraph.
44. Add Structure to Your Text
Add More Text and Press Return Twice
When you press the Return key while typing in Composer , it adds a break or <br> tag to your text, which forces the next text to the next line. This is not the same as a paragraph tag, which represents a new logical unit or paragraph. When you press the Return key twice in a row, it ends the paragraph and starts a new paragraph.
Enter a Headline and Format It As H1
Put your cursor in front of the first line of text and enter a headline. Keep your cursor on the line and, from the format drop-down list on the Format Toolbar, select H1 .
Giving a heading on a page an <h1> heading lets the browser know that everything from that <h1> to the next <h1> tag is related .