Main

 
Page #6a: Play! Time for

index previous page Play Time! next page

  1. Create your third page. Start from scratch. Do not re-use prior work for this exercise.
  2. Identify it as your third page. (Hint: <title> etc.)
  3. Use this text: "The quick brown dog jumped over the lazy fox."
  4. Enter this exciting text exactly as you see it below. Copy & paste will make it easier:
    <BODY>
      The quick brown dog jumped over the lazy fox. The quick brown dog jumped over the
      lazy fox. The quick brown dog jumped over the lazy fox.
    
      The quick brown dog jumped over the lazy fox.
      The quick brown dog jumped over the lazy fox.
      The quick brown dog jumped over the lazy fox.
    </BODY>
              
  5. Before adding either <br /> or <p> </p> tags, save your work (call the file "prac06.htm" or "prac06.html"). Then display your work to see where the browser breaks off each line.
  6. Now experiment by placing <br /> tags randomly, save the file and then redisplay the page in the browser.
  7. Experiment by placing pairs of <p> </p> tags randomly, save the file and then redisplay the page in the browser.
  8. Fix any coding errors.

Style Note

Where you place tags generally makes no difference to the browser. The browser will display the green code and the purple code below in exactly the same way.

xxxxsome text some text<br />some text some text<br />

xxxxsome text some text<br />
xxxxsome text some text<br />

However, when you and I look over our code — perhaps with an eye toward editing, it's easy to miss that <br /> in the middle of the line of green code. Equally important, by placing the <br /> tag at the end of a line of code, you are breaking off the line of code in the same place that the line of text will break on the Web page itself. That makes it much easier to keep track of where you are when you need to edit your pages.

I leave a blank line both before and after the material that I enclose within the <p> </p> tags. This is exactly what these tags do with the text on your Web page — put a blank line before and a blank line after. Doing the same thing with your code makes it much easier to make sense of your code when you look at it months later to do some editing. (To see examples of this, view the Source of this page.)

My rules of thumb ("rule of thumbs"?): Place the <br /> tag at the end of the line it breaks. Surround the material enclosed by the <p> </p> tags by blank lines.

Oh...and indent, indent, indent!