
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
If you are looking for Web Programming course, you are at right place. This lecture key words are: Cascading Style Sheets, Css Formatting Capabilities, Introduction to Css, Css Versions, Style Rules, Types of Selectors, Element in Element, Element in Class, Declaring a Class, Id Selectors
Typology: Slides
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























Overview of Cascading Style Sheets (CSS) Ways to declare a CSS CSS formatting capabilities New features in CSS
CSS 2 is the current version supported by most browsers CSS 3 is in the “draft” state. The standard is broken down into several modules I’ll talk about CSS 3 and where we are
Style rules format “things” The things we format are defined by the selector Element names Classes IDs
Property / value pairs are enclosed in a selection block A selector precedes the declaration block
There are different types of selectors Each has a different level of “specificity” A class within an element An id within an element An element within an element
Classes allow you to restrict the selector by setting the class attribute of some other element Class named begins with a period Followed by the developer-chosen class name Followed by the typical { property:value ; property:value }
Declare a class named MyClass (name begins with a dot (.))
.MyClass {color:aqua}
Declare a class that will be applied only to tags
p.MyClass {color:aqua}
## ID Selectors They are similar to inline styles but allow a style to be referenced through an element’s id attribute One-to-one correspondence between the selector and style
Use these to format blocks with **** and
The declaration is similar to a class Use # instead of. in the CSS file Example
#TestID { }
Using CSS is (usually) a two-part process Declare a style Use the style to format an element, such as a paragraph One style can be used to format many elements
Inline The style is declared as part of the element declaration in the element’s body We really don’t use these much Embedded Declared in the header of the Web page ( **** ) element External The style is declared in a CSS page and used by the referencing HTML page
The style attribute contains the style declaration Some text
Embedded (internal) style sheets appear inside of a **