About formatting HTML textWhen you add text to your Web pages, it starts out as simple HTML paragraph elements. You can make the text more interesting and easier to read by dividing it up into sections and using HTML headings for the structure. You can add form, color, and presentation to the structure (and to individual words within the structure) using cascading style sheets (CSS) or HTML text formatting attributes. You can also format text as hypertext links that jump to anchors within the page or to other pages. (See Creating hypertext links.) GoLive provides three main methods for formatting text on your Web page. Using cascading style sheets Cascading style sheets let you define text formatting attributes once and instruct Web browsers to reuse the definitions whenever text on a page refers to them. (This saves your pages from having lots of source code on them and makes them faster to download.) Style sheets give you more design control than you get with basic HTML--letting you define color, typography, alignment, page positioning, fonts, borders, and more. It's easier to update your site's appearance using style sheets--when you change a style in a style sheet, the change is instantly updated in all pages containing text that refers to the style. (See Using Cascading Style Sheets.) Individually applying HTML text attributes You can use the Type menu and the toolbar for applying HTML structuring and formatting attributes to text. The toolbar includes attributes for headings; bold, italic, and teletype; alignment, text size and color; and numbered and bulleted lists. The Type menu provides these options and more, including options for creating and applying font sets. The context menu for selected text also provides a quick way to apply certain formatting attributes. (See Using context menus.) Using the HTML Style palette As you apply individual HTML formatting attributes to text in your pages, you can save them (or capture them) as a group in the HTML Style palette, and then use the palette to reapply the group of attributes to other text in your site in one step. The palette contains several predefined styles to give you an idea of the type of styles you can make. To save a style in the HTML Style palette, you can either capture attributes from formatted text or choose them from a menu when you create a new style. Unlike CSS styles, HTML styles are not linked to text, so changing a style does not affect any text that the style was applied to.
Using both CSS and HTML text attributes Pages that use cascading style sheets load in the browser window much faster than pages that are individually formatted with HTML text attributes--but CSS is not supported by older browsers. To cover a wider range of Web browsers, you may want to format your text first using HTML structure elements and attributes, making it look good for older browsers that don't support CSS, and then use style sheets to build on the HTML structuring, making it look great for those browsers that support CSS. HTML text structure elements that work well with cascading style sheets include headings (such as the <h1> element), block quotes (creating block indents), and lists (default numbered or unnumbered lists). However, some HTML text formatting attributes, such as the font element, are known to cause problems with browsers trying to interpret style sheets. In those cases, it's best to apply those attributes using CSS styles. (See Applying fonts, type sizes, and color to text.)
|