HTML: Horizontal Rules

Horizontal Rules are simply a horizontal line that runs across the page. The tag is simply:

<hr /> and this would produce:


Horizontal Rules, just like breaks <br /> are considered to be self-closing elements. This means in the HTML 4.01 standard they do not require a closing tag. However to be forward compliant with XHTML 1.0 all tags are required to be closed. We could write this as:

<hr></hr> but that looks a bit awkward. The conventional and accepted way to close self-closing elements is to use this short-hand method:

<hr /> -- note there should be a single space between the hr and the /.


modifed: 2009-09-29
Google
web www.digitalvertebrae.com
Exercises
The exercises for this week are listed below and available in PDF or MS Word formats.
HTML - Trying it Out
Creating a Template Document
HTML - Creating a Simple Web Page
 
©2009 Web Site Development: an introduction