Character Formatting

 < Day Day Up > 



This section covers basic character formatting through the use of Font tags. Font tags are deprecated in the W3C[1] HTML 4.0 specification in favor of using Cascading Style Sheets (CSS) and should be used only when you are targeting extremely old browsers (prior to version 4). The tools used to apply font formatting Macromedia Dreamweaver MX are found on the Property inspector or in the Text menu. If you must use font formatting across many pages, make the work easier by using the HTML Styles panel in the Design group.

Font face

By default, browsers render text in the Times New Roman or Times typeface. You can specify your own font. However, the user viewing the page must actually have the font you specified installed on their machine for this to work. For that reason, it is best to specify a list of fonts, selecting system fonts if possible. Dreamweaver's font lists use system fonts and provide several categories of serif, sans-serif, and monospaced faces. To choose a font family, follow these steps:

  1. Select a block element, such as a paragraph or other tag using the Tag selector. You can also make a text selection.

  2. Set font face, using the "A" menu in the Property inspector, or choose Text ® Font ® , and select from the fonts shown.

Font size

The HTML specification offers limited font-sizing options. You can choose an absolute size using a value between 1 and 7. Or, set a relative size, which places a plus (+) or minus (-) sign before the same 1-7 size options. A relative size looks to the size of the current block element and adds or subtracts a size (or two) to come up with a new value relative to the current default font size selected by the viewer.

Here's the tricky part:. Sizes 1-7 are equal to XXS–XXL. There is no size 0 or size 8; so, if you set a paragraph to use Size 4 text, then make a selection within that paragraph and size it to +6, it will not equal size 10. To make things worse, browsers set their own point sizes for each of the sizes; therefore, text in one browser may appear larger than in another.

Using basefont

Most, but not all, modern browsers recognize the <basefont> tag. Use Insert ® Tag to insert <basefont> with the Tag Chooser. Place the <basefont> tag just after the <body> tag.

Cross-Reference 

Text inside tables may not render using the basefont settings. You might need to apply font tags to the content in each table cell. See Chapter 34 for more details.

start sidebar
PC versus Mac Font Sizing

By default, browsers render text using their defaults, which vary from browser to browser, causing great consternation for designers who want to control the layout of their pages. The browser also uses point-based values, editable by the end-users in their browser's preferences, to display text. For example, Netscape 4x browsers on the Macintosh platform default to 12-point text for most elements. Internet Explorer browsers on the PC use 16-point text for the same default size.

To make things worse, point sizes are rendered at different resolutions on Macintosh and PC. Macs use 72dpi (dots per inch); whereas PCs use 96dpi. Roughly, this means that 12-point text on a PC shows up at about 75 percent of that size on a Mac. It's easy to see how frustrating HTML character formatting can be.

end sidebar

Font color and style

To color a bit of text or a specific paragraph or heading, use the Color button to the right of the Font Size menu. Use the B and I buttons to apply bold or italic formatting to a selection.

 Habitat Alert site   To add color to some of the text in the  mission_statement.htm page, follow these steps:

  1. Select the <body> tag with the tag selector and use the Property inspector to apply the Verdana category at Size -1.

  2. Select the first <h4> heading and set its size to default by choosing None from the Size menu. Set its color to #999933.

  3. Repeat step 2 for the second heading.

  4. Save and preview the page.

[1]The World Wide Web Consortium (W3C) develops interoperable technologies (specifications, guidelines, software, and tools) to lead the Web to its full potential. W3C is a forum for information, commerce, communication, and collective understanding. See www.w3c.org.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net