Share this Page URL

Chapter 3. From Buck-Naked to Beautiful:... > A Few Formatting Features You'll Use... - Pg. 33

From Buck-Naked to Beautiful: Dressing Up Your Page 33 <BODY> <H2>Supply Without the Demand</H2> <HR> <TT>Print-on-demand</TT> is new system that lets bookstores print out a book whenever a customer asks for one. It's <I>really</I> slick. Recently, I was in a store called <b>The Book "Seller"</B> and it had a service called <B>Print- On-Non-Demand</B>&#174; featuring books that <I>very</I> few people would ever order, much less print out. The titles included the following <P> The Complete Idiot's Guide to Village Idiocy<BR> The 10-Minute Guide to Butt-Scanning<BR> Baby's First Book of Java<BR> Leashes Unleashed<BR> Programmer's Guide to Basic Hygiene<BR> Teach Yourself the Presidency in 4 Years </P> </BODY> </HTML> In the list of books, I added the <BR> tag to the end of each line (except the last one; I don't need it there). As you can see in Figure 3.4, Internet Explorer dutifully displays each line separately, with no space in between. Figure 3.4. Use the <BR> tag to force a line break in your text. Inserting Horizontal Lines If you're particularly eagle-eyed, you might have noticed a horizontal line extending across the browser screen shown in Figure 3.4. What gives? Well, while you weren't looking, I surreptitiously inserted an <HR> tag into the HTML text. <HR>, which stands for "horizontal rule," produces a line across the page, which is a handy way to separate sections of your document. If you use <HR> by itself, you get a standard line that goes right across the page. How-ever, there are various attributes associated with the <HR> tag that enable you to change the line's size, width, alignment, and more. Table 3.3 shows a rundown. Table 3.3. Extra Attributes for the <HR> Tag <HR> Extension <HR WIDTH="x"> <HR WIDTH="y%"> <HR SIZE="n"> What It Does Sets the width of the line to x pixels Sets the width of the line to y percent of the window Sets the thickness of the line to n pixels (where the default thickness is 1 pixel)