|
Formatting with Style SheetsStyle sheets are the preferred way to add formatting to your web pages, because styles offer the most formatting control for the designer and the most flexibility for the user. What is CSS?CSS stands for Cascading Style Sheets. Styles define how to display HTML elements and are normally stored in a separate file (###.css) and linked to the HTML document that uses those styles. Multiple style definitions will cascade into one, allowing users to customize their experience with your web pages without interfering with the content. Forms of StylesCascading styles can be created in several different forms. In-line styles: appears inside the HTML element. For example to center some text, you may choose to use the "align" formatting attribute inside the P element. <p align="center">This text will appear centered.</p> Internal styles: style definitions are stored in the HTML document, located between the HEAD element tags. For example, if you wanted the body of your page to have a blue background and your text to be yellow, you might have a style that looks like this: <head> External Style Sheet: style definitions are stored in a separate CSS file (name.css). In the HEAD element of the style sheet is linked to the document. <head> Browser Default: no styles are defined. Pages will use the settings customized by the user or the default settings included with the browser software. This tutorial uses the internal or embedded styles. Linked styles are a better option for site management to insure consistency across pages. However, linked styles requires more knowledge of CSS design. For more, see the WAC handout: "WAC Workshop: Cascading Style Sheets." You can practice building CSS online using the excellent W3Schools CSS tutorial. Create a New Embedded StyleManaging styles in Dreamweaver requires that you have the
Practice.htm: Note that some styles have already been created for you in the practice file. These styles format the menu links at the top of the page and require more advanced knowledge of CSS to create. For this tutorial, you will need to redefine the
Define Your New Style
Applying Your Custom StylesIf you reformat an existing HTML tag, you do not need to do anything special to apply the formatting. For custom styles, you must apply the style to the text or paragraph. In most cases, you want the style to apply to the entire paragraph. Avoid using the Apply a style to an entire paragraph.
Apply a style to a section of text.
Styles can be applied to any tag
|
||||||||||||
OSU Web Accessibility Center (WAC)
1760
Neil Ave
150
Pomerene Hall
Columbus,
Ohio
43210
Phone: (614) 292-1760
Fax: (614) 292-4190
E-mail: webaccess@osu.edu
For questions or problems with this site, including incompatibility with assistive technology,
email the WAC Webmaster.