SlideShare una empresa de Scribd logo
1 de 12
Class 5
Overview ofCascading Style Sheets (CSS) 2 Greater typography and page layout control Style is separate from structure Styles can be stored in a separate document and linked to from the web page Potentially smaller documents Easier site maintenance
CSS: Separating Structure and Design CSS in Action: http://www.csszengarden.com
Types of Cascading Style Sheets Inline Styles Embedded Styles External Styles Imported Styles 4
Inline Styles Inline Styles ,[object Object]
Use the style attribute of an XHTML tag
Apply only to the specific element5
Inline CSS Inline CSS Configured in the body of the Web page  Use the style attribute of an XHTML tag Apply only to the specific element Example: 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 CSS Embedded Styles ,[object Object]
Use the XHTML <style> element
Apply to the entire Web page document,[object Object]

Más contenido relacionado

La actualidad más candente

The three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth yearThe three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth yearPerry Mallari
 
Cascading style-sheet-
Cascading style-sheet-Cascading style-sheet-
Cascading style-sheet-Nimrakhan89
 
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and StyleLesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and StylePerry Mallari
 
11 Quiz related to HTML, CSS, JS and WP
11 Quiz related to HTML, CSS, JS and WP11 Quiz related to HTML, CSS, JS and WP
11 Quiz related to HTML, CSS, JS and WPRashna Maharjan
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSSSiddhantSingh980217
 
Introducing the style tag 2830
Introducing the style tag  2830Introducing the style tag  2830
Introducing the style tag 2830mdjstudios
 
Fwd week2 tw-20120903
Fwd week2 tw-20120903Fwd week2 tw-20120903
Fwd week2 tw-20120903TerryWeber
 
Introduction to html course digital markerters
Introduction to html course digital markertersIntroduction to html course digital markerters
Introduction to html course digital markertersSEO SKills
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheetvijayta
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to htmleShikshak
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style SheetsMarc Steel
 

La actualidad más candente (20)

Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
The three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth yearThe three types of style sheet lesson two fourth quarter fourth year
The three types of style sheet lesson two fourth quarter fourth year
 
Cascading style-sheet-
Cascading style-sheet-Cascading style-sheet-
Cascading style-sheet-
 
HTML CSS | Computer Science
HTML CSS | Computer ScienceHTML CSS | Computer Science
HTML CSS | Computer Science
 
Web Designing
Web DesigningWeb Designing
Web Designing
 
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and StyleLesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
Lesson One Fourth Quarter Fourth Year High School CSS Modern Layout and Style
 
11 Quiz related to HTML, CSS, JS and WP
11 Quiz related to HTML, CSS, JS and WP11 Quiz related to HTML, CSS, JS and WP
11 Quiz related to HTML, CSS, JS and WP
 
Rational HATS and CSS
Rational HATS and CSSRational HATS and CSS
Rational HATS and CSS
 
Web development using HTML and CSS
Web development using HTML and CSSWeb development using HTML and CSS
Web development using HTML and CSS
 
Css module1
Css module1Css module1
Css module1
 
Introducing the style tag 2830
Introducing the style tag  2830Introducing the style tag  2830
Introducing the style tag 2830
 
Html css
Html cssHtml css
Html css
 
Css introduction
Css   introductionCss   introduction
Css introduction
 
Fwd week2 tw-20120903
Fwd week2 tw-20120903Fwd week2 tw-20120903
Fwd week2 tw-20120903
 
Introduction to html course digital markerters
Introduction to html course digital markertersIntroduction to html course digital markerters
Introduction to html course digital markerters
 
Html1
Html1Html1
Html1
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Introduction to html
Introduction to htmlIntroduction to html
Introduction to html
 
Cascading Style Sheets
Cascading Style SheetsCascading Style Sheets
Cascading Style Sheets
 
html & css
html & css html & css
html & css
 

Similar a Class5

Similar a Class5 (20)

Higher Computing Science CSS
Higher Computing Science CSSHigher Computing Science CSS
Higher Computing Science CSS
 
HTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptxHTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptx
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Chapter 02
Chapter 02Chapter 02
Chapter 02
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
Css introduction
Css introductionCss introduction
Css introduction
 
Css mod1
Css mod1Css mod1
Css mod1
 
Welcome to css!
Welcome to css!Welcome to css!
Welcome to css!
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Chapter 4a cascade style sheet css
Chapter 4a cascade style sheet cssChapter 4a cascade style sheet css
Chapter 4a cascade style sheet css
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
 
Css basic
Css basicCss basic
Css basic
 
CSS.ppt
CSS.pptCSS.ppt
CSS.ppt
 
TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0TUTORIAL DE CSS 2.0
TUTORIAL DE CSS 2.0
 
Css tutorial
Css tutorialCss tutorial
Css tutorial
 
CSS tutorial
CSS tutorialCSS tutorial
CSS tutorial
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
 

Más de Jiyeon Lee (20)

Cultural conflict resolution
Cultural conflict resolutionCultural conflict resolution
Cultural conflict resolution
 
Class22
Class22Class22
Class22
 
Class 21
Class 21Class 21
Class 21
 
Class 21
Class 21Class 21
Class 21
 
Class 20
Class 20Class 20
Class 20
 
Class19
Class19Class19
Class19
 
Class18
Class18Class18
Class18
 
Class 17
Class 17Class 17
Class 17
 
Class14
Class14Class14
Class14
 
Class15
Class15Class15
Class15
 
Class 12
Class 12Class 12
Class 12
 
Class13
Class13Class13
Class13
 
Class11
Class11Class11
Class11
 
Class 10
Class 10Class 10
Class 10
 
Class8
Class8Class8
Class8
 
Class7
Class7Class7
Class7
 
Class6
Class6Class6
Class6
 
Class4
Class4Class4
Class4
 
Class 3
Class 3Class 3
Class 3
 
Class2
Class2Class2
Class2
 

Class5

  • 2. Overview ofCascading Style Sheets (CSS) 2 Greater typography and page layout control Style is separate from structure Styles can be stored in a separate document and linked to from the web page Potentially smaller documents Easier site maintenance
  • 3. CSS: Separating Structure and Design CSS in Action: http://www.csszengarden.com
  • 4. Types of Cascading Style Sheets Inline Styles Embedded Styles External Styles Imported Styles 4
  • 5.
  • 6. Use the style attribute of an XHTML tag
  • 7. Apply only to the specific element5
  • 8. Inline CSS Inline CSS Configured in the body of the Web page Use the style attribute of an XHTML tag Apply only to the specific element Example: 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.
  • 11. Use the XHTML <style> element
  • 12.
  • 13. Common FormattingCSS Properties See Table 3.1 Common CSS Properties, including: background-color color font-family font-size font-style font-weight line-height margin text-align text-decoration width 10
  • 14. CSS Embedded Styles Embedded style
  • 15. CSS Selectors CSS style rules can be configured for an: HTML element selector class selector id selector

Notas del editor

  1. Show limits of inline styling of many repeated elements such as DT’s and DD’s