Lesson 4A - Horizontal Lines

There is a quick and easy way to display a horizontal straight line on a web page. Type <hr>. HR stands for Horizontal Rule.

The hr tag is a block element, so there will be a line break before and after the line is drawn. You cannot use this command inline. Try it.

You will learn about Style in Lesson 8, which is a better way to draw a horizontal line, but here are several lines drawn with different style attributes:

<hr>
<hr size="10px">
<hr size="10px" noshade>
<hr width="50%">
<hr width="50%" align="left">
<hr align="right" color="#ff0000" width="65%"><br><br>
This is just to show you what happens when you place an HR<hr> tag within a line.

Paste the above into sample.htm. (While you are there, change the Basefont color attribute value to 'black'.) These would appear:









This is just to show you what happens when you place an HR
tag within a line.

In this lesson, we learned about these HTML tags:
<hr>
By now, your sample.htm file should look like this.

Lesson 3C Depricated Font/Basefont Tags   < <  PREVIOUS   Table of Contents NEXT  > >   Lesson 4B Headers

Developed with HTML-Kit
Sandersongs Web Tutorials
Contact the Webmasterwith comments.
©2017, by Bill Sanders, all rights reserved.
This domain had 3,942 different visits in the last 30 days.
435,417 hits on this domain since 24 Nov 2006.
http://sandersongs.com/HTMLcourse/Lesson04A.php
This page was last modified on our server on 25 Sep 2013
and last refreshed on our server at 12:20 pm, MST
This file took 0.01714 seconds to process.