Textbook Notes (369,067)
Canada (162,366)
Dr.Hurst (18)

CSS ppt+text

4 Pages

Computer Science
Course Code

This preview shows page 1. Sign up to view the full 4 pages of the document.
3.1 Introducing Cascading Style Sheets • One can efficiently format an unlimited number of Web pages with a consistent appearance. • Advantages: – Greater consistency in your Web site – Easily modified code – More flexible formatting – Greater functionality • Cross-browser support allows CSS to appear in all Web browsers without any differences. Understanding How Styles Are Written • A style is a consistent, recognizable pattern • A CSS style is a collection of one or more rules • A style sheet is a collection of styles • Rule – combination of a selector, a property, and a value • Selector – you can apply a style to an identified element – type selectors/element selctor(format XHTML elements), -class selectors (used to select a specific XHTML element or format one or more elements on a web page, -id selectors( used to select uniquely format a single element on a web page) -property describes how the selector will be modified -each property and value pair (color:white) is called a declaration -declaration list-the group of all the declarations -paragraph format places all the CSS code on one or more lines as wrapping text Working with color • The colour property changes the foreground colour of an element • The background-colour property changes the background colour of an element • You can define colour in three ways: – By name – By their RGB triplet – By a hexadecimal value -avoid green-on-red, or red-on-green combinations -hexadecimal system is based on the number 16, and uses the numbers 0-15. (0-9 is the same, 10-15 is A to F) -hexadecimal numbers as hex code -short hex, you use just the first number or letter to enter each pair, but only if the pairs have repeating characters (#FFFF00 to #FF0) -web-safe colors, because all computer monitors should be able to display them correctly Creating an Embedded Style Sheet • An embedded style sheet is one in which the CSS code is written in the section of an XHTML document • The code syntax for an embedded style sheet: -style element in XHTML is a special element that serves as a container for all the style code -the type attribute, with a value of text/css, is always entered within the start
More Less
Unlock Document

Only page 1 are available for preview. Some parts have been intentionally blurred.

Unlock Document
You're Reading a Preview

Unlock to view full version

Unlock Document

Log In


Join OneClass

Access over 10 million pages of study
documents for 1.3 million courses.

Sign up

Join to view


By registering, I agree to the Terms and Privacy Policies
Already have an account?
Just a few more details

So we can recommend you notes for your school.

Reset Password

Please enter below the email address you registered with and we will send you a link to reset your password.

Add your courses

Get notes from the top students in your class.