Class 5
Overview ofCascading Style Sheets (CSS)2Greater typography and page layout controlStyle is separate from structureStyles can be stored in a separate document and linked to from the web pagePotentially smaller documentsEasier site maintenance
CSS: Separating Structure and DesignCSS in Action:http://www.csszengarden.com
Types of Cascading Style SheetsInline StylesEmbedded StylesExternal StylesImported Styles4
Inline StylesInline StylesConfigured in the body of the Web page
Use the style attribute of an XHTML tag
Apply only to the specific element5
Inline CSSInline CSSConfigured in the body of the Web page Use the style attribute of an XHTML tagApply only to the specific elementExample: configure red color text in an <h1> element:<h1 style="color:#ff0000">Heading text is red</h1>6
Inline CSS Separate style rule declarations with ;<h1 style="color:#FF0000; background-color:#cccccc">This is displayed as a red heading with gray background</h1>7
Embedded CSSEmbedded StylesConfigured in the header section of a Web page.
Use the XHTML <style> element
Apply to the entire Web page documentCSS SyntaxStyle sheets are composed of  "Rules" that describe the styling to be appliedEach Rule contains a Selector and a DeclarationDeclaration for the Selectors are contained in Curly BracesEach Declaration is ended with a semi-colon9td { color: #3399cc; }selectorpropertyvalue

More Related Content

PPTX
Html styles
PPTX
CSS- Cascading Style Sheet
PPTX
HTML and CSS
PPTX
Unit iii css and javascript 1
PPTX
Html & CSS
PPTX
Html and css
PPTX
chitra
Html styles
CSS- Cascading Style Sheet
HTML and CSS
Unit iii css and javascript 1
Html & CSS
Html and css
chitra

What's hot (20)

PDF
Introduction to css
PPTX
The three types of style sheet lesson two fourth quarter fourth year
PPTX
Cascading style-sheet-
PPTX
HTML CSS | Computer Science
PPTX
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
PPTX
11 Quiz related to HTML, CSS, JS and WP
PPT
Rational HATS and CSS
PPTX
Web development using HTML and CSS
PPTX
Css module1
PPTX
Introducing the style tag 2830
PDF
Html css
PPTX
Css introduction
PPTX
Fwd week2 tw-20120903
PPTX
Introduction to html course digital markerters
PPT
PPT
Cascading Style Sheet
PDF
Introduction to html
PPT
Cascading Style Sheets
PPTX
html & css
Introduction to css
The three types of style sheet lesson two fourth quarter fourth year
Cascading style-sheet-
HTML CSS | Computer Science
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
11 Quiz related to HTML, CSS, JS and WP
Rational HATS and CSS
Web development using HTML and CSS
Css module1
Introducing the style tag 2830
Html css
Css introduction
Fwd week2 tw-20120903
Introduction to html course digital markerters
Cascading Style Sheet
Introduction to html
Cascading Style Sheets
html & css
Ad

Similar to Class5 (20)

PPTX
This is css which compiled by alex that is impo
PDF
An Introduction to CSS
PPTX
Css and its types
PDF
4. Web Technology CSS Basics-1
PPTX
CSS-ppt.pptx f df dff dfvdfv fdvfdfddf dfv df
PPTX
Cascading style sheet an introduction
PPTX
HTML to CSS Basics Exer 2.pptx
PPTX
CSS Basics (Cascading Style Sheet)
PPTX
it-150608145445-lva1-app6891Unit_3 .pptx
PPT
3.2 introduction to css
PPT
3.2 introduction to css
PPT
PPT
Introduction to css by programmerblog.net
PPTX
Cascading Style Sheets (CSS) - An introduction
PPTX
CSC PPT 4.pptx
PPTX
Session v(css)
PPT
How Style Sheets Work
This is css which compiled by alex that is impo
An Introduction to CSS
Css and its types
4. Web Technology CSS Basics-1
CSS-ppt.pptx f df dff dfvdfv fdvfdfddf dfv df
Cascading style sheet an introduction
HTML to CSS Basics Exer 2.pptx
CSS Basics (Cascading Style Sheet)
it-150608145445-lva1-app6891Unit_3 .pptx
3.2 introduction to css
3.2 introduction to css
Introduction to css by programmerblog.net
Cascading Style Sheets (CSS) - An introduction
CSC PPT 4.pptx
Session v(css)
How Style Sheets Work
Ad

More from Jiyeon Lee (20)

PPTX
Cultural conflict resolution
PPTX
Class22
PPTX
Class 21
PPTX
Class 21
PPTX
Class 20
PPTX
Class19
PPTX
Class18
PPTX
Class 17
PPTX
Class14
PPTX
Class15
PPTX
Class 12
PPTX
Class13
PPTX
Class11
PPTX
Class 10
PPTX
Class8
PPTX
Class7
PPTX
Class6
PPTX
Class4
PPTX
Class 3
PPTX
Class2
Cultural conflict resolution
Class22
Class 21
Class 21
Class 20
Class19
Class18
Class 17
Class14
Class15
Class 12
Class13
Class11
Class 10
Class8
Class7
Class6
Class4
Class 3
Class2

Class5

  • 2. Overview ofCascading Style Sheets (CSS)2Greater typography and page layout controlStyle is separate from structureStyles can be stored in a separate document and linked to from the web pagePotentially smaller documentsEasier site maintenance
  • 3. CSS: Separating Structure and DesignCSS in Action:http://www.csszengarden.com
  • 4. Types of Cascading Style SheetsInline StylesEmbedded StylesExternal StylesImported Styles4
  • 5. Inline StylesInline StylesConfigured in the body of the Web page
  • 6. Use the style attribute of an XHTML tag
  • 7. Apply only to the specific element5
  • 8. Inline CSSInline CSSConfigured in the body of the Web page Use the style attribute of an XHTML tagApply only to the specific elementExample: configure red color text in an <h1> element:<h1 style="color:#ff0000">Heading text is red</h1>6
  • 9. Inline CSS Separate style rule declarations with ;<h1 style="color:#FF0000; background-color:#cccccc">This is displayed as a red heading with gray background</h1>7
  • 10. Embedded CSSEmbedded StylesConfigured in the header section of a Web page.
  • 11. Use the XHTML <style> element
  • 12. Apply to the entire Web page documentCSS SyntaxStyle sheets are composed of "Rules" that describe the styling to be appliedEach Rule contains a Selector and a DeclarationDeclaration for the Selectors are contained in Curly BracesEach Declaration is ended with a semi-colon9td { color: #3399cc; }selectorpropertyvalue
  • 13. Common FormattingCSS PropertiesSee Table 3.1 Common CSS Properties, including:background-color colorfont-family font-size font-stylefont-weightline-heightmargintext-aligntext-decorationwidth10
  • 15. CSS SelectorsCSS style rules can be configured for an:HTML element selectorclass selectorid selector

Editor's Notes

  • #8: Show limits of inline styling of many repeated elements such as DT’s and DD’s