Приглашаем посетить
Лермонтов (lermontov-lit.ru)

Hour 5. Basic Text Alignment and Formatting

Previous Page
Table of Contents
Next Page

Hour 5. Basic Text Alignment and Formatting

In the early days of the Web, text was displayed in only one font and in one size. If you've been around computers long enough to remember what it was like before mice and graphical operating systems entered the picture, you know what I'm talking about because text formatting in those days was limited to making sure that you pressed Enter to start a new paragraph! HTML makes it possible to control the appearance of text and how it is aligned and displayed on a web page. This hour starts off with the basics of text alignment and formatting, and eventually guides you through some advanced text tips and tricks. You'll learn to incorporate boldface, italics, superscripts, subscripts, underlining, and strikethrough text into your pages, as well as how to choose typefaces and font sizes.

Another important topic covered in this hour is lists, which provide a means of listing multiple items in HTML. Because lists are so common in web pages, HTML provides tags that automatically indent text and add numbers or bullets in front of each listed item. You'll find out in this hour how to format numbered and bulleted lists, not to mention definition lists, which can be used as a simple way to indent content on a page.

By the Way

There are two completely different approaches to controlling text formatting and alignment in HTML. The approach you'll study in this lesson conforms to the XHTML standard and involves a technology called CSS (Cascading Style Sheets). Even though you won't formally learn about CSS until Hour 12, "Formatting Web Pages with CSS Style Sheets," you'll find out just enough in this lesson to apply styles to text. There is an "old way" of formatting text that I mention briefly at the beginning of this lesson, but there is no sense in spending much time learning it because it is being phased out of HTML. Not only that, but CSS is considerably more powerful.


Try It Yourself

You can make the most of this hour if you have some text that needs to be indented, centered, or otherwise manipulated visually in order to be more presentable:

  • Any type of outline, bullet points from a presentation, numbered steps, glossary, or list of textual information from a database will serve as good material to work with.

  • Any text will do, but try to find (or type) some text you want to put onto a web page. The text from a company brochure or from your personal résumé might be a good choice.

  • If the text you'll be using is from a word processor or database program, be sure to save it to a new file in plain-text or ASCII format. You can then add the appropriate HTML tags and style attributes to format it as you go through this lesson.

  • Add the <html>, <head>, <title>, and <body> tags (discussed in Hour 2, "Create a Web Page Right Now") before you use the code introduced in this chapter to format the body text.


Previous Page
Table of Contents
Next Page