HTML Scripting Lesson 3a - Margins

February 23, 2003

MARGINS

To set the MARGINS on our HTML page, we need to type two different attributes in the BODY tag.

To Specify Margins (top and Left), in the BODY Tag type:

LEFTMARGIN=x TOPMARGIN=y for EXPLORER USERS, AND
MARGINWIDTH=x MARGINHEIGHT=y for NETSCAPE Users.

The number represents Number of PIXELS (remember screen resolution is 72 dpi)


PREFORMATTED TEXT

Sometimes you want text to appear exactly how you type it on the page, so use PRE



List		List		Item		Item



Row		Row		Row		Row


*****************************************************************

OR


Use Preformatted Text to create lists / columns or just quickly line things up. 
(but be aware that preformatted text will display differently on different systems anyway).


Media Cage Hours:



Monday		Tuesday		Wednesday	Thursday	Friday

------			------			------			------			------

8-9				8-9				8-9				8-9				8-3



Don't forget to end this preformatted text with a closing tag!

Notice that regular text appears in the System font, while Preformatted text is ALWAYS monospace (Courier / typewriter).

BUT...

Use the FONT FACE TAG within the PRE open and close tags to

Change the font of the Preformatted text!! 						Yeah
		:)		:)		:)		:(		;)		&:	


CENTER tag

Centering Elements on a Page


Center your font to give emphasis or if you are using a title.

With the CENTER tag, you can center many elements on a page, including...
text, headers, images, forms, etc...

If you type more after the center tag, it will return to the left margin.


BLOCKQUOTE tag

If you want to quote someone or indent text, use the BLOCKQUOTE:
When I was your age, I used to walk to school 12 miles uphill both ways in the snow or tropical blizzard. You think you had it bad....

And when I got in trouble, boy, did I get it!

If the quote is more than one line, it will still be indented even if you use BR or P.

Then after the BLOCKQUOTE it returns to the normal margins.


On to Today's lists Lecture     |     Back to Syllabus