The
advanced |
8. Advanced text formatting The main purpose of the Web is to communicate ideas. Its been that way from the beginning. In the early days, content was kingmeaning, people just used the Web to present thoughts or offer opinions through words. Pictures, clip art, movie clips and even sound werent part of the Web yet. Nowadays, the Web has a totally different look and feel. In fact, the Web has radically changed from its early years. What was once a place that strictly exchanged information is now a place to entertain, sell goods and services, share ideas and especially, learn new things. Designing an inviting page has become an important issue. Now we see tons of graphics, animations, in-the-news movie clips, 3-D computer games and much more. While content is still king, a well designed Web page is now considered equally importantperhaps even the queen. That brings us to topic at hand: text formatting. Here is where good design begins and fortunately, HTML allows us to do quite a lot with text. There are several tags and attributes to learn, but they all help youthe designerto create an eye-pleasing page. In this section, we will cover the following tags and attributes:
Font tag* <font> </font> The font tag gives you some control over how your page will look. But unlike other tags discussed so far, the font tag does nothing without an attribute (remember an attribute describes what the tag should do). We will cover three attributes used with the font tag: <font size=
"#">
</font> *A Note to Remember: In the new HTML (version 4.0), the font tag has been deprecated--a big word that means the tag will be dropped in favor of Cascade Style Sheets (CSS). If you would like more information on CSS, please check out the Web site: Style Master to learn more. This changeover--from the font tag to CSS--will happen sometime in the future, but right now many Web sites are still using the font tag. We are in what is called the "transitional period," meaning things are still changing. Font Size Learning HTML code <font size=5> does have its advantages, </font> especially considering how important the WWW has become. The resulting line in a browser: Learning HTML code does have its advantages, especially considering how important the WWW has become. Notice how the type increased? You can also decrease your text. Lets take the same sentence but use size=1. Learning HTML code does have its advantages, especially considering how important the WWW has become. By using the size attribute, you can change your
text to whatever you like. (By the way, your browsers default size is number 3.)
Here are all seven levels as they would appear in your browser: Font Face So how can prevent this problem? Include more than one type face. For instance, lets say you want the following text to appear in Arial typeface. This is how you would do it. <font face="Arial, Helvetica">Selecting type styles can be tricky at times. You must always consider your end user.</font> Your end result will look like this: Selecting type styles can be tricky at times. You must always consider your end user. If the users computer did not have Arial, the browser would automatically search for the next typeface mentioned, which in this case is Helvetica. If no such type styles are on the computer, then the browser will go to the default type of Times Roman. Fortunately Windows® 95 and Macintosh® come with a variety of different typefaces: Arial You can specify these typefaces, and the browser will easily find them. However, its best to specify more than one typeface, just in case an end user is operating Windows 3.0 or has for some reason, taken one of these typefaces off the computer system. So how does the attribute look for other type styles? <font face="bookman old
style"> <font
face="arialblack"> <font face="garamond"> Font Color Selecting type styles can be tricky at times. <font color="#0033ff">You should always consider your end user.</font> This will create text that is bright blue: Selecting type styles can be tricky at times. You should always consider your end user. Notice two things here. First of all, the color has been specified in hex code (remember we discussed that in the last lesson). Two, since we did not specify the typeface, the type appeared as Times Roman. Let's apply what we've learned Step 1 Load your text editor and open the HTML document we have been working on: firstpage.html Step 2 Here's how to add some attribute codes to your original HTML file. Enter the code listed below in red. <html> <body
bgcolor="#ffff00" text="#000000"> <hr
align="center" width="50%"> <p>I can also create lists using numbers and bullets. Here is an example of a list with numbers: <ol> Here's how it will appear in your browser. Congratulations, you have just added a new font size, typeface and font color to your Web page! Other text formatting tags Bold and Italic tags To create bold text use: <b>
</b> Blockquote <blockquote> </blockquote> Small and big tags <small> </small> To create copy that is slightly larger than normal: <big> </big> Center tag* <center> </center> *Please note the center tag is another one that is being replaced in HTML 4.0
|