KISS HTML
You CAN write HTML code from scratch

Manipulating the "Horizontal Rule" or <HR> tag


The Horizontal Rule tag can be changed by adding "attributes" to the tag.
A default Horizontal Rule is above. This is what you get if you don't specify anything else.

However, if you add a WIDTH attribute, you can shorten it.
The code looks like this
<HR WIDTH=200>
which looks like this on your web page:



Compare this with the Horizontal Rule above.
Note: The number "200" tells your browser the number of pixels on your monitor screen which will be effected.

You can also add a SIZE attribute, which determines the height of the Horizontal Rule and looks like this:
<HR SIZE=8 WIDTH=200>
and displays a thicker Horizontal Rule, like this:



Another way to control the width of the Horizontal Rule is by expressing it in a percentage. It assumes that the total width of your monitor screen is 100%. By telling it to display only 50%, the Rule will only span 1/2 of your monitor screen.
Your browser assumes 100%, so it would normally look like:



but if you add a Width percentage
<HR SIZE=8 WIDTH=50%>
it displays only half the width and is centered, like this:


Your browser also assumes that the Horizontal Rule is to be "centered", so it places it in the middle of a page (or the middle of a "table" space).
You may desire to change the display from the center to the left side of the page, so you specify an "Align" attribute.
<HR SIZE=8 WIDTH=50% ALIGN=LEFT>
which moves the Horizontal Rule to the left side of the page and looks like this:


You can really squish it up, if you want to, by specifying the following
<HR SIZE=15 WIDTH=15 ALIGN=LEFT>
which displays like this:



Manipulating the Horizontal Rule allows you to be more creative in designing your web page.

  <- Back