Different Worlds: An Introduction to HTML

Line Breaks & Horizontal Rules

Line breaks

We've used <P>...</P> to indicate the start and end of a paragraph, and if you are using a visual browser, you will have seen that your browser usually puts a blank line between the end of one paragraph and the beginning of the next. However there are times when you simply want an element on the page to start on a new line, for example if you are quoting some lines of poetry, or several lines of programme code. For this, we use the line break tag - <BR>. There is no end </BR> tag, since this element doesn't enclose anything - it simply tells the browser to display the next element on a new line. If you look at the source code of any of the example files, you will see that I've used the <BR> tag to start each line of code on a new line.

Most visual browsers will acknowledge two <BR> tags next to each other, and will do two line breaks, creating a blank line. More than two <BR> tags in a row, however, will usually be "collapsed" by the browser, and won't create any additional blank space on the screen.

Horizontal rules

There are various techniques for indicating a change in the subject matter in a document. One simple one is to place a horizontal rule across the page, like this:


This is another single tag element - <HR>. Use this sparingly, however - a page which has lots of horizontal rules tends to look amateurish. Consider, instead, using headings and images to break up the content of a page into different sections. If the sections are long enough, it may even be preferable to make each section a separate page, with hyperlinks to link each of the sections together, which is what I've done with the different sections of this tutorial.

Next: What Next?


Valid HTML 4.01

http://www.users.zetnet.co.uk/dms/htmlguide/html10.html
© 1998-2001 Donna Smillie <dms@zetnet.co.uk>