3
Most read
5
Most read
WEEK 11 REVIEW 
CSS 
(CASCADING 
STYLE SHEETS)
HTML IS THE FOUNDATION, 
CSS IS THE PRESENTATION
REVIEW: 
WHAT IS CSS? 
• CSS (Cascading Style Sheets) is a style sheet language developed to 
control the presentation (look and feel) of markup language documents, in 
our case HTML 
• CSS is a collection of formatting rules 
Examples: 
• size of font 
• color of font 
• font family 
• margins, 
• border, 
• underline etc…
ANATOMY OF A CSS STYLE
ELEMENT SELECTORS: 
FOR REGULAR HTML TAGS 
• The element selector selects all tags with the specified element name 
• These are very broad and the styles given to them would apply to all 
• Elements selectors refer to regular HTML tags 
p { color: red; } 
h1 { color: yellow; } 
ul { color: red; } 
strong { color: blue; } 
em { color: green; }
CLASS SELECTORS: 
FOR ANY ELEMENT 
• Classes can be added to any html element (<p>, <h1>, <strong>, 
<em>, etc.) 
• Classes can be named almost anything – you decide 
• You can apply a class as many times on a page as needed 
• Class selectors always start with a period in the css file (.example) 
CSS: 
.subhead { color: red; } 
HTML: 
<h2 class=”subhead”>My Subhead</h2>
ID SELECTORS: 
FOR ANY ONE ELEMENT ON A PAGE 
• An id selector needs to be unique within a page 
• Use the id selector when you want to style a single, unique 
element. 
CSS: 
#subhead { color: red; } 
HTML: 
<h2 id=”subhead”>My Subhead</h2>
3 WAYS TO APPLY STYLES 
1. Embedded style: 
• Typed directly into each html document, applies only to that document, 
embedded in the <head></head> section 
2. Linked style sheet 
• Separate style sheet document linked to each html page 
• Control the style of an entire site from 1 style sheet 
• Links go in the <head></head> section of each page 
3. In-line 
• Add the style attribute to the relevant tag, eg: <body style=“color: 
#333333”> 
• An inline style loses many of the advantages of a style sheet (by mixing 
content with presentation). Use this method sparingly!
LINKING CSS STYLE SHEETS 
• Linking a style sheet means that you can control the 
presentation of a site consisting of multiple pages from 1 CSS 
file 
You link to a separate file: 
• <link href="global.css" rel="stylesheet" type="text/css" /> 
• Linked Style Sheet are named with a .css extention (ie. 
global.css). 
• Linked Style Sheet are added in head section between the 
opening and closing head tags just like embedded CSS styles 
This is the technique we will be using in class
CSS: WHAT TO REMEMBER! 
• Start an element selector 
(an HTML tag) with just the tag, 
eg: 
body or p or h1 { declarations } 
• Start a class selector (a style 
you’ve created) with a period, 
eg: 
• Following the selector insert “curly” 
brackets that enclose all the 
declarations, eg: 
• Write the property: first followed by 
a the value; 
.className 
font-weight: normal;

More Related Content

PPT
Cascading Style Sheets (CSS) help
ODP
CSS Basics
PDF
HTML CSS JS in Nut shell
PDF
Basic-CSS-tutorial
PPT
Html & Css presentation
PPTX
Html & CSS
PPTX
Media queries A to Z
Cascading Style Sheets (CSS) help
CSS Basics
HTML CSS JS in Nut shell
Basic-CSS-tutorial
Html & Css presentation
Html & CSS
Media queries A to Z

What's hot (20)

PPT
How Cascading Style Sheets (CSS) Works
PPTX
HTML and Responsive Design
PPTX
PPTX
Html1
PPTX
The Complete HTML
PPT
Css Ppt
PPTX
PDF
Html frames
PDF
CSS Dasar #8 : Pseudo-class
PDF
CSS notes
PPTX
Html coding
PDF
HTML and CSS crash course!
PPTX
HTML (Web) basics for a beginner
PPTX
PDF
CSS Dasar #6 : Background
PPTX
CSS tutorial chapter 1
PPT
Learning Html
PPTX
Basic Html Knowledge for students
PPT
Css lecture notes
How Cascading Style Sheets (CSS) Works
HTML and Responsive Design
Html1
The Complete HTML
Css Ppt
Html frames
CSS Dasar #8 : Pseudo-class
CSS notes
Html coding
HTML and CSS crash course!
HTML (Web) basics for a beginner
CSS Dasar #6 : Background
CSS tutorial chapter 1
Learning Html
Basic Html Knowledge for students
Css lecture notes
Ad

Viewers also liked (19)

ODP
PPTX
Css ppt
PPTX
Cascading style sheet
PDF
Css from scratch
PPTX
PDF
Pseudo CSS Selectors
PDF
CSS Pseudo Classes
PDF
PPTX
Css pseudo-classes
PPT
Cascading Style Sheet
PPTX
Cascading Style Sheet (CSS)
PPTX
Web Engineering - Basic CSS Properties
PPT
JDBC – Java Database Connectivity
PPT
JDBC Java Database Connectivity
PPT
Introduction to CSS
PPT
Agile Development | Agile Process Models
PPT
Css ppt
Cascading style sheet
Css from scratch
Pseudo CSS Selectors
CSS Pseudo Classes
Css pseudo-classes
Cascading Style Sheet
Cascading Style Sheet (CSS)
Web Engineering - Basic CSS Properties
JDBC – Java Database Connectivity
JDBC Java Database Connectivity
Introduction to CSS
Agile Development | Agile Process Models
Ad

Similar to Week 12 CSS - Review from last week (20)

PPTX
PPTX
Lecture 3CSS part 1.pptx
PPTX
Lecture 9 CSS part 1.pptxType Classification
PPTX
Introduction to CSS
PDF
4. Web Technology CSS Basics-1
PPT
IP - Lecture 6, 7 Chapter-3 (3).ppt
PPTX
Teaching presentation
PPT
Learning CSS for beginners.ppt all that are but
PDF
Css presentation introdution with sample basic projects
PPTX
cascading style sheets- About cascading style sheets on the selectors
PDF
Intro to HTML and CSS - Class 2 Slides
PPT
Css week11 2019 2020 for g10 by eng.osama ghandour
PDF
Css tutorial
PDF
Css - Tutorial
PPT
ch04-css-basics_final.ppt
PPT
CSS Lesson 1.ppt Cascading Style Sheet Stylesheet Language
PPTX
Session v(css)
PPTX
Cashcading stylesheets
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PPT
Introduction to css by programmerblog.net
Lecture 3CSS part 1.pptx
Lecture 9 CSS part 1.pptxType Classification
Introduction to CSS
4. Web Technology CSS Basics-1
IP - Lecture 6, 7 Chapter-3 (3).ppt
Teaching presentation
Learning CSS for beginners.ppt all that are but
Css presentation introdution with sample basic projects
cascading style sheets- About cascading style sheets on the selectors
Intro to HTML and CSS - Class 2 Slides
Css week11 2019 2020 for g10 by eng.osama ghandour
Css tutorial
Css - Tutorial
ch04-css-basics_final.ppt
CSS Lesson 1.ppt Cascading Style Sheet Stylesheet Language
Session v(css)
Cashcading stylesheets
Cascading style sheet, CSS Box model, Table in CSS
Introduction to css by programmerblog.net

More from Katherine McCurdy-Lapierre, R.G.D. (18)

PPTX
Module 5 - WCM system comparison
PPTX
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
PPTX
Module 3 - Intro to Bootstrap
PPTX
Week 4 - tablet app design
PPTX
Week 3 Lecture: Accessibility
PPTX
Interactive Web Design 5 - Week 2 - Introduction
PPTX
Week 12 CSS Font - size
PPTX
Week 12 CSS Font - family
PPTX
Week 4 Lecture Accessibility
PPTX
Week 4 Lecture Part 1
PPTX
Week 4 Lecture Part 2
PPTX
Artistic Web Applications - Week3 - Part 1
PPTX
Artistic Web Applications - Week3 - Part 3
PPTX
Artistic Web Applications - Week3 - Part 2
PPTX
Week2 lecture-whatiswebdesign-part1
PPTX
LecWeek2 lecture-whatiswebdesign-part2
Module 5 - WCM system comparison
Module 4 - Dreamweaver Templates (Static vs. Dynamic Content)
Module 3 - Intro to Bootstrap
Week 4 - tablet app design
Week 3 Lecture: Accessibility
Interactive Web Design 5 - Week 2 - Introduction
Week 12 CSS Font - size
Week 12 CSS Font - family
Week 4 Lecture Accessibility
Week 4 Lecture Part 1
Week 4 Lecture Part 2
Artistic Web Applications - Week3 - Part 1
Artistic Web Applications - Week3 - Part 3
Artistic Web Applications - Week3 - Part 2
Week2 lecture-whatiswebdesign-part1
LecWeek2 lecture-whatiswebdesign-part2

Recently uploaded (20)

PDF
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
PPTX
Ppt obs emergecy.pptxydirnbduejguxjjdjidjdbuc
PPTX
Chapter-4-Rizal-Higher-Education-1-2_081545.pptx
PDF
Unleashing the Potential of the Cultural and creative industries
PDF
V02-Session-4-Leadership-Through-Assessment-MLB.pdf
PDF
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
PDF
GIÁO ÁN TIẾNG ANH 7 GLOBAL SUCCESS (CẢ NĂM) THEO CÔNG VĂN 5512 (2 CỘT) NĂM HỌ...
PPTX
Juvenile delinquency-Crim Research day 3x
PDF
HSE 2022-2023.pdf الصحه والسلامه هندسه نفط
PPTX
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
PPTX
macro complete discussion with given activities
PDF
3-Elementary-Education-Prototype-Syllabi-Compendium.pdf
PPTX
Approach to a child with acute kidney injury
PDF
New_Round_Up_6_SB.pdf download for free, easy to learn
PDF
GSA-Past-Papers-2010-2024-2.pdf CSS examination
PPT
hsl powerpoint resource goyloveh feb 07.ppt
DOCX
HELMET DETECTION AND BIOMETRIC BASED VEHICLESECURITY USING MACHINE LEARNING.docx
PDF
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
PDF
HSE and their team are going through the hazards of the issues with learning ...
PDF
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf
BSc-Zoology-02Sem-DrVijay-Comparative anatomy of vertebrates.pdf
Ppt obs emergecy.pptxydirnbduejguxjjdjidjdbuc
Chapter-4-Rizal-Higher-Education-1-2_081545.pptx
Unleashing the Potential of the Cultural and creative industries
V02-Session-4-Leadership-Through-Assessment-MLB.pdf
NGÂN HÀNG CÂU HỎI TÁCH CHỌN LỌC THEO CHUYÊN ĐỀ TỪ ĐỀ THI THỬ TN THPT 2025 TIẾ...
GIÁO ÁN TIẾNG ANH 7 GLOBAL SUCCESS (CẢ NĂM) THEO CÔNG VĂN 5512 (2 CỘT) NĂM HỌ...
Juvenile delinquency-Crim Research day 3x
HSE 2022-2023.pdf الصحه والسلامه هندسه نفط
Unit1_Kumod_deeplearning.pptx DEEP LEARNING
macro complete discussion with given activities
3-Elementary-Education-Prototype-Syllabi-Compendium.pdf
Approach to a child with acute kidney injury
New_Round_Up_6_SB.pdf download for free, easy to learn
GSA-Past-Papers-2010-2024-2.pdf CSS examination
hsl powerpoint resource goyloveh feb 07.ppt
HELMET DETECTION AND BIOMETRIC BASED VEHICLESECURITY USING MACHINE LEARNING.docx
WHAT NURSES SAY_ COMMUNICATION BEHAVIORS ASSOCIATED WITH THE COMP.pdf
HSE and their team are going through the hazards of the issues with learning ...
LATAM’s Top EdTech Innovators Transforming Learning in 2025.pdf

Week 12 CSS - Review from last week

  • 1. WEEK 11 REVIEW CSS (CASCADING STYLE SHEETS)
  • 2. HTML IS THE FOUNDATION, CSS IS THE PRESENTATION
  • 3. REVIEW: WHAT IS CSS? • CSS (Cascading Style Sheets) is a style sheet language developed to control the presentation (look and feel) of markup language documents, in our case HTML • CSS is a collection of formatting rules Examples: • size of font • color of font • font family • margins, • border, • underline etc…
  • 4. ANATOMY OF A CSS STYLE
  • 5. ELEMENT SELECTORS: FOR REGULAR HTML TAGS • The element selector selects all tags with the specified element name • These are very broad and the styles given to them would apply to all • Elements selectors refer to regular HTML tags p { color: red; } h1 { color: yellow; } ul { color: red; } strong { color: blue; } em { color: green; }
  • 6. CLASS SELECTORS: FOR ANY ELEMENT • Classes can be added to any html element (<p>, <h1>, <strong>, <em>, etc.) • Classes can be named almost anything – you decide • You can apply a class as many times on a page as needed • Class selectors always start with a period in the css file (.example) CSS: .subhead { color: red; } HTML: <h2 class=”subhead”>My Subhead</h2>
  • 7. ID SELECTORS: FOR ANY ONE ELEMENT ON A PAGE • An id selector needs to be unique within a page • Use the id selector when you want to style a single, unique element. CSS: #subhead { color: red; } HTML: <h2 id=”subhead”>My Subhead</h2>
  • 8. 3 WAYS TO APPLY STYLES 1. Embedded style: • Typed directly into each html document, applies only to that document, embedded in the <head></head> section 2. Linked style sheet • Separate style sheet document linked to each html page • Control the style of an entire site from 1 style sheet • Links go in the <head></head> section of each page 3. In-line • Add the style attribute to the relevant tag, eg: <body style=“color: #333333”> • An inline style loses many of the advantages of a style sheet (by mixing content with presentation). Use this method sparingly!
  • 9. LINKING CSS STYLE SHEETS • Linking a style sheet means that you can control the presentation of a site consisting of multiple pages from 1 CSS file You link to a separate file: • <link href="global.css" rel="stylesheet" type="text/css" /> • Linked Style Sheet are named with a .css extention (ie. global.css). • Linked Style Sheet are added in head section between the opening and closing head tags just like embedded CSS styles This is the technique we will be using in class
  • 10. CSS: WHAT TO REMEMBER! • Start an element selector (an HTML tag) with just the tag, eg: body or p or h1 { declarations } • Start a class selector (a style you’ve created) with a period, eg: • Following the selector insert “curly” brackets that enclose all the declarations, eg: • Write the property: first followed by a the value; .className font-weight: normal;