Some cookies are necessary to make this site and our content available to you. Other Cookies enable us to analyse and measure audience and traffic to the site. Cookies are also used by us, advertisers, ad-tech providers and others to develop and serve ads that are more relevant to your interests. To consent to the use of Cookies and proceed to the site, click Accept below. If you wish to withdraw consent later you will find a link in the footer Cookie Choices. For more information: Privacy Policy.

Lesson 3 - More Advanced Text continued....

Horizontal Lines:
If you want to divide the page, a useful command is the horizontal rule (hr). The default rule goes all the way along the page and looks like this:



Wherever you want to add a line to divide a page, simply type <hr> . You can change several things to make it look different, such as its width, height, and the amount of shading it has.

Width can either be measured in pixels (a webpage is normally about 600 pixels wide) or by typing the percentage of the screen you want the line to cover. To change the width you simply type <hr width="300"> or <hr width="50%">. A horizontal rule that is 300 pixels in length looks like this:


Size refers to how large the horizontal rule is. You change it in the same way as you alter the width. If you wanted to make a ten-pixel-wide line, you would type
<hr size=10> and it would look like this:


By default, horizontal rules have shading. You can create a line without any shading by typing <hr noshade>. This will look similar to the line pictured below:


You can combine as many variables as you'd like within the same tag. If you wanted to create a ten-pixel-wide rule that was 300 pixels long and had no shading, you would type <hr noshade width="300" size="10">. It would appear similar to the line below:


It doesn't matter what order the variables are in, as long as they are all within the < and > tags.

Go to Previous Lesson Go to Next Lesson