BestWebTutorials.com
A service of CrystalClearWeb.net
 
Web BestWebTutorials.com

XHTML Tutorial #2 - Text Elements, Page 4

Horizontal line element

A horizontal line element is also not exactly a text element, but it is used to break up the page into sections which aids the presentation of the text.

The horizontal line element is another element like the line break element that does not have a closing tag. The proper form of the horizontal line element is "<hr />". Again, note the space between the "hr" and the slash.

Open your favorite text editor and enter the following code. Save the file as example_2f.htm.

<html>
<head>
<title>Example 2F - Horizontal Line Element </title>
</head>
<body>
<p>This is the first paragraph. It is followed by a horizontal line element.</p>
<hr />
<p>This is is the second paragraph.</p>
</body>
</html>

Now open this example in your favorite browser. It should look something like this:

A horizontal line element can be placed within a table cell or list item. If a horizontal line element is placed within a paragraph, the browser interprets the start of the horizontal line as the end of the paragraph.

On the next page of this tutorial, we will look at some tags that can be used to modify the appearance of text elements.


Additional resources

BestWebTutorials.com is a free service of CrystalClearWeb.net. You can help us keep providing free tutorials and information by:

  • Link to us
  • Tell a friend
  • Correct any  you might find
  • Make for improvement
  • Make a donation


web services byCrystalClearWeb.net