|
|
Building Web Pages From Ground Zero By Professor Nibble ã Nibble University 2000-2007 Hyperjump to Breaks, Headings, Paragraphs, Assignments BREAK, HEADING & PARAGRAPH TAGS - Lesson 2 |
|
|
In lesson 1 you learned the BASIC STRUCTURAL TAGS that make up the skeleton of every HTML page. By doing the two assignments you can see that you need to learn more tags if you are going to manipulate your text and graphics to come out the way you want. You also learned that browsers ignore spaces in your document (other than one space between words). As long as your tags follow the proper order, it doesn't matter how you write them. However, to make it easier for yourself or someone else to read your code, it makes sense to organize your tags. Take a look at these examples to see what I mean. |
|
|
Example 1: <HTML> <HEAD> |
|
|
Example 2: <HTML> |
|
|
Example two is much easier to read, even though the result to the browser would be the same for both examples. Many good web page builders use indents to make code even easier to read as shown in example three below: |
|
|
<HTML> <HEAD> <TITLE> Type a title for your page here </TITLE> </HEAD> <BODY> This is what the browser shows. </BODY> </HTML> |
|
The most important issue here is to show a degree of organization and stay consistent from page to page. OK. Let's learn some more tags that will help us take control of this beast. |
|
|
|
|
|
<BR> |
|
|
This tag starts a new line. It is just like pressing the enter/return key while using a word processor. It does not have a closing tag. Look at this example: |
|
|
<HTML> |
|
|
The result of the above code is: |
|
This is line one. |
|
|
HEADINGS (ALIAS HEADER) TAGS |
|
|
There are six sizes of headers or headings. Headings are placed on their own line, boldfaced and space is created before and after the heading so it isn't jammed up against the text that precedes or follows it. To create a heading, put the following tags around your text: |
|
|
<H1>Words in your heading</H1> |
|
|
Other sizes include: <H2></H2> |
|
Get this - the larger the number the smaller the heading. If you need a heading larger than <H1>, you can create it in a graphics program and save it as a graphic instead of text. More about that when we play around with graphics. You will experiment with the different sizes of heading in the assignments at the end of this lesson. |
|
|
|
|
|
To put some space between lines of text, or in other words, to create a new block paragraph, use the paragraph tag. <P> </P> I think you're entitled to know a little secret - if you forget to put the closing tag it doesn't matter at all. Also, you don't need to use the header tags and paragraph tags together since header tags include extra space above and below them. I usually use a closing paragraph tag because it feels like the right thing to do. Here is a simple example using headers and paragraphs: |
|
|
<HTML> |
This Is A HeadingMary had a little lamb but wished she had a goat. Jack and Jill went up the hill but Jack forgot his coat. Little Miss Muffit sat on a tuffit eating her chip and dip. Little Bo Peep has lost her sheep and is having an anxiety fit. Notice how the paragraph tag puts a little space above this text and how the heading tag added space before and after the text. Pretty cool, eh? |
|
|
|
|
|
Assignment 2 - Lesson 2
|