Chapter 3: Headings, Paragraphs & Breaks
• List and describe the different Heading elements.
• Use Paragraphs to add text to a document.
• Insert breaks where necessary.
• Add a Horizontal Rule.
• List and describe the different Heading elements.
• Use Paragraphs to add text to a document.
• Insert breaks where necessary.
• Add a Horizontal Rule.
In this chapter you will add headings to your page, insert paragraphs, add some breaks, and add horizontal rules. |
OBJECTIVESUpon completing this section, you should be able to 1. List and describe the different Heading elements.2. Use Paragraphs to add text to a document.3. Insert breaks where necessary.4. Add a Horizontal Rule. |
Headings, Paragraphs, Breaks and Horizontal RulesHeadings, <Hx> </Hx> Inside the BODY element, heading elements H1 through H6 are generally used for major divisions of the document. Headings are not mandatory. Headings are permitted to appear in any order, but you will obtain the best results when your documents are displayed in a browser if you follow these guidelines:
|
EXAMPLE:
<HTML><HEAD><TITLE>Example Page</TITLE></HEAD><BODY> <H1>Heading 1</H1> <H2>Heading 2</H2> <H3>Heading 3</H3> <H4>Heading 4</H4> <H5>Heading 5</H5> <H6>Heading 6</H6> </BODY></HTML> | As displayed by the browser. |
Paragraph, <P> </P> Paragraphs allow you to add text to a document in such a way that it will automatically adjust the end of line to suit the window size of the browser in which it is being displayed. Each line of text will stretch the entire length of the window. EXAMPLE:
|
|
Break, <BR> Line breaks allow you to decide where the text will break on a line or continue to the end of the window. There may be instances where you want the text to appear on the next line. Example: a return address - contained in one Paragraph but on multiple lines or text in a Header, such as a title for the document. You can insert a Forced Line Break <BR> |
A <BR> is an Empty Element, meaning that it may contain attributes but it does not contain content. The <BR> element does not have a closing tag. The closing tag, </BR>, is not required as this element marks a position and does not contain content. The <BR> element uses one attribute – CLEAR which can have a value of LEFT, RIGHT or ALL. The CLEAR attribute forces a line down; if an image is located at the page’s left margin, the clear LEFT attribute will move the cursor down to the first line that is cleared at the left margin. The same applies with the option of the clear RIGHT attribute. If an image is at either the left or right margins, the clear ALL attribute will force a line break until both margins are cleared.
|
EXAMPLE:
<HTML> <HEAD> <TITLE>Example Page</TITLE> </HEAD> <BODY> <H1>Heading 1</H1> <P>Paragraph 1, <BR> Line 2 <BR> <HR> Line 3 <BR> ... </P> … … |
As displayed by the browser.
|
Chapter 3 – Exercise 1 - Headings In this exercise you will add headings to your document. Procedure
|
SOLUTION: EXERCISE 1
<HTML><HEAD><TITLE>XYZ Corporation</TITLE></HEAD> <BODY BGCOLOR="#FFFFFF"> <H1>XYZ Corporation</H1> <H2>IS Department</H2> <H3>Intranet Project</H3> <H4>Intranet Project Plan</H4> <H3>Internet Project<H3> <H4>Internet Project Plan</H4> </BODY></HTML> | As displayed by the browser. |
Chapter 3 – Exercise 2 – Horizontal Rules In this exercise you will add HR’s to your document. Procedure
|
SOLUTION: EXERCISE 2
<HTML><HEAD><TITLE>XYZ Corporation</TITLE> </HEAD> <BODY BGCOLOR="#FFFFFF"> <H1>XYZ Corporation</H1> <HR WIDTH="50%"> <H2>IS Department</H2> <H3>Intranet Project</H3> <H4>Intranet Project Plan</H4> <H3>Internet Project<H3> <H4>Internet Project Plan</H4> <HR></BODY></HTML> |
As displayed by the browser.
|
Chapter 3 – Exercise 3 – Paragraphs & Breaks In this exercise you will add paragraphs and a break to your document. Procedure
|
SOLUTION: EXERCISE 3
<HTML><HEAD><TITLE>XYZ Corporation</TITLE></HEAD> <BODY BGCOLOR="#FFFFFF"> <H1>XYZ Corporation</H1> <HR WIDTH="50%"> <H2>IS Department</H2> <P><BR></P> <H3>Intranet Project</H3> <P></P> <H4>Intranet Project Plan</H4> <P></P> <H3>Internet Project<H3> <P></P> <H4>Internet Project Plan</H4> <P></P> <HR> </BODY> </HTML> |
As displayed by the browser.
|
Review Questions
- How do browsers handle multiple spaces?
- How do paragraphs format text?
- How many Headings are there?
- When would you use a Break?
- How would you insert a HR that is centered and half a page wide
Summary | |||
As a result of this chapter, you should be able to
|
0 comments:
Post a Comment