Professional Documents
Culture Documents
What is CSS? Cascading Style Sheets (CSS) is a common computer language used to control the formatting of
Web documents through a set of stylistic rules.
CSS Syntax
Similar to any other language, understanding the structural syntax of CSS is crucial. Essentially, a CSS rule may be
broken down to two main components: a selector and declaration(s). The selector indicates which HTML element
you wish to format, while a declaration consists of a property and a value. A property signifies which style attribute
you wish to change, and is assigned a respective value.
NOTE: Declarations always end in a semicolon. A group of declarations are enclosed by brackets.
Why CSS?
CSS will allow us to reduce the number of HTML tags used in a page design, while simultaneously leaving the
layout aesthetic uncompromised. CSS separates style from content. Also, using an external style sheet allows you
to alter the format style of an entire site by only editing a single file! Here is a quick re-cap of HTML tags commonly
used with CSS:
• <h> heading tags ranging from <h1> to <h6> used to mark headings in your page
• <ul> & <ol> un-ordered/ordered list tags used to create menus or bulleted lists
• <div> tag used to define sections of an HTML page and group block elements for styling
• <img> image tag used to link to images so that they appear on a HTML page
ID Selector
The ID selector is used to specify a style for an individual HTML element and is defined with ‘#’. For example, the
style rule below will be applied with the ID selector “para1”.
#para1
{
text-align:center;
color:red;
}
Class Selector
The Class selector is used to specify a style for a group of HTML elements and is defined with ‘.’ For example, the
style rule below will be applied with the Class selector “center”.
.center {text-align:center;}
You can also specify that only specific HTML attributes should be changed by a Class selector. For example, all p
elements with Class selector “center” will be centrally-aligned.
p.center {text-align:center;}
DISCLAIMER! We have thus far begun to understand the structural nature of CSS. However,
the Dreamweaver program does not require much knowledge of CSS code editing. In any case, CSS is still a
practical language to know especially given its use at more advanced levels.
What is Dreamweaver? Adobe Dreamweaver CS5 is a web-editor that allows you to create, build, and manage
websites. As a “What-You-See-Is-What-You-Get” editing program, whatever you design and visually experience is
what visitors will see on your site. The power of Dreamweaver lies in its superior ability for file management.
Note: Selecting a new file with a CSS Page Type disallows use of the Properties panel. By
selecting a HTML Page Type, you may still work with CSS within the Properties panel.
This is the root folder in which templates will be saved. Moreover, you will later return to the ‘Manage Sites’ tab to
upload your document.
Note: Styles can also be edited, organized, and removed from this panel.
If using the HTML Page Type, or a CSS Page Type, use your newly updated CSS knowledge to construct the
template format of your Web document. To attach created style sheets to your template, simply click the
icon on the CSS styles panel.
For more quick reference sheets or to see this one on action visit us at: www.collaborate.ucsb.edu