SlideShare a Scribd company logo
1 of 29
Download to read offline
WEB DEVELOPMENT & DESIGN
FOUNDATIONS WITH HTML5
Chapter 3
Key Concepts

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

1
LEARNING OUTCOMES
 Apply inline, embedded (aka internal), external style sheets
 Configure element, class, id, and contextual selectors
 Use the W3C CSS Validator

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

2
CASCADING STYLE SHEETS (CSS)
 CSS Demo: http://www.csszengarden.com

 CSS:
 Desktop publishing style sheet technology

for Web Dev

 W3C standard => cross-platform

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

3
CSS
ADVANTAGES

Separates style (CSS) from structure

(HTML)

Styles can be stored in a separate file

=> Easier site maintenance

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

4
TYPES OF CASCADING STYLE
SHEETS (1)

External
Embedded (aka Internal)
Inline

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

5
 Inline Styles

CASCADING STYLE SHEETS

◦ body section
◦ HTML style attribute
◦ applies to one element

 Embedded/Internal Styles
◦ head section
◦ HTML style element
◦ applies to entire web page

 External Styles
◦ Separate .css file
◦ Connect to web page w/link element in head section

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

6
CSS SYNTAX
 Style sheets are composed of Style Rules
 Style Rule: Selector & Declaration

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

7
CSS Example
Web page w/ blue text, yellow background:
body { color: blue;
background-color: yellow; }
OR use HEX triple color codes (ch. 7-8, FIT5):
body { color: #0000FF;
background-color: #FFFF00; }

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

8
COMMON
CSS PROPERTIES
 Table 3.1 Common CSS Properties:
◦ background-color
◦ color
◦ font-family
◦ font-size
◦ font-style
◦ font-weight
◦ line-height
◦ margin
◦ text-align
◦ text-decoration
◦ width

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

9
USING COLOR ON WEB PAGES
monitors display color as

intensities of Red/Green/Blue
light
RGB values 0 .. 255
Hexadecimal numbers (base 16)

are shorthand notation:
0 .. 255 == 00 .. FF
Copyright © Terry Felke-Morris

Wednesday, October 23, 13

10
HEXADECIMAL
COLOR VALUES
 # indicates hex digits
 Hex pairs 00 .. FF
 Three hex pairs => RGB as HEX TRIPLE
#000000 black

#FFFFFF white

#FF0000 red

#00FF00 green

#0000FF blue

#CCCCCC grey

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

11
INLINE CSS
 Inline CSS
 Style Attribute
Example:

<h1 style="color:#ff0000">Heading text is red</h1>

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

14
CSS EMBEDDED/INTERNAL STYLES
 Style element in head section

=> Internal Style Sheet
 Rules apply to entire web page

<style>
body { background-color: #000000;
color: #FFFFFF;
}
</style>

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

16
CSS properties for configuring text:
 font-weight
 font-style
 font-size
 font-family

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

19
THE FONT-FAMILY PROPERTY

p {font-family: Arial, Verdana, “Courier New”, sans-serif;}

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

21
CSS SELECTORS
simple selector

=> selects html element(s)
class selector
=> selects "class" of elements
id selector
=> selects ONE element on a web page
 contextual selector (aka descendent)

=> selects all nested elements

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

23
USING CSS WITH “CLASS”
Define the class:

<style>
.new { color: #FF0000;
font-style: italic;
}
</style>

Apply the class:

<p class=“new”>This is text is red and in italics</p>

<h4 class=“new”>More Red Italics</h4>

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

24
USING ID SELECTORS
Define the id Selector:
Web Field Trip:
octothorn, octalthorp,
octatherp, octothorpe (#)

<style>
#new { color: #FF0000;
font-size:2em;
font-style: italic;
}
</style>

Apply the id selector:
<p id=“new”>This is text is red, large, and in italics</p>

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

25
CONTEXTUAL SELECTOR
Select element within context of its

container (parent) element.
AKA descendent selector
example applies only to

<style>
#footer a {
color: green;
}
</style>

links located w/in element tagged
id=’footer’

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

26
SPAN ELEMENT
Purpose:
style content inline
no empty space above/below a span
inline display, not block display

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

27
SPAN ELEMENT EXAMPLE
<style>
.companyname { font-weight: bold;
font-size: larger; }
</style>

<p>Your needs are important to us at <span
class=“companyname">Acme Web Design</span>.
We will work with you to build your Web site.</p>

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

28
EXTERNAL STYLE SHEETS
CSS style rules stored in a .css file
 may contain style rules only
 may not contain any HTML tags

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

29
EXTERNAL STYLE SHEETS 2
Multiple web pages can associate with

the same external style sheet file.
site.css
body {background-color:#E6E6FA;
color:#000000;
font-family:Arial, sans-serif;
font-size:90%; }
h2 { color: #003366; }
.nav { font-size: 16px;
font-weight: bold; }

index.html
clients.html
about.html
Etc…

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

30
EXAMPLE
External Style Sheet: color.css
body { background-color: #0000FF;
color: #FFFFFF;
}

To link 110/p3/demo.html to 110/css/color.css:
<head>
<link rel="stylesheet" href="../css/color.css">
</head>

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

32
CENTERING PAGE CONTENT
WITH CSS
#container { margin-left: auto;
margin-right: auto;
width:80%; }

Example: services.html

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

34
THE “CASCADE”

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

35
W3C CSS VALIDATION
 http://jigsaw.w3.org/css-validator/

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

36
Ch. 3 Assessment:
Learning Outcomes - Know the following

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

37
Ch. 3 Assessment:
Learning Outcomes - Know the following

Copyright © Terry Felke-Morris

Wednesday, October 23, 13

37

More Related Content

Viewers also liked

Revago20141004 andre - de overtreffende aeonen
Revago20141004 andre - de overtreffende aeonenRevago20141004 andre - de overtreffende aeonen
Revago20141004 andre - de overtreffende aeonenmissim77
 
Revago20141004 gerard - gods wijsheid die leidt naar succes
Revago20141004 gerard - gods wijsheid die leidt naar succesRevago20141004 gerard - gods wijsheid die leidt naar succes
Revago20141004 gerard - gods wijsheid die leidt naar succesmissim77
 
ATN utk Kedokteran
ATN utk KedokteranATN utk Kedokteran
ATN utk KedokteranPak Zaenal
 
スマートウォッチってどうなん
スマートウォッチってどうなんスマートウォッチってどうなん
スマートウォッチってどうなん三菱 うにたん
 
Revago20141004 goswin - gods genade zwart op wit
Revago20141004 goswin - gods genade zwart op witRevago20141004 goswin - gods genade zwart op wit
Revago20141004 goswin - gods genade zwart op witmissim77
 
Warner Robins MSA: Potential Market for Industry and Technology Corridor
Warner Robins MSA:  Potential Market for Industry and Technology CorridorWarner Robins MSA:  Potential Market for Industry and Technology Corridor
Warner Robins MSA: Potential Market for Industry and Technology CorridorShermaine M. Perry, MPA
 
Ch. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13FCh. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13Fmh-108
 
Radiografi zae
Radiografi zaeRadiografi zae
Radiografi zaePak Zaenal
 
Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)
Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)
Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)Yasuyuki SAITO
 
Digipack 3rd draft
Digipack 3rd draftDigipack 3rd draft
Digipack 3rd draftjam3scoles
 
Advertstar Performance based affiliate platform Presentation 2015
Advertstar Performance based affiliate platform Presentation 2015Advertstar Performance based affiliate platform Presentation 2015
Advertstar Performance based affiliate platform Presentation 2015Сергей Кузьмичев
 
Avoiding top 5 reasons online videos fail
Avoiding top 5 reasons online videos failAvoiding top 5 reasons online videos fail
Avoiding top 5 reasons online videos failHuStream Video
 
Mfv ren ch.4
Mfv ren ch.4Mfv ren ch.4
Mfv ren ch.465swiss
 

Viewers also liked (16)

Revago20141004 andre - de overtreffende aeonen
Revago20141004 andre - de overtreffende aeonenRevago20141004 andre - de overtreffende aeonen
Revago20141004 andre - de overtreffende aeonen
 
Revago20141004 gerard - gods wijsheid die leidt naar succes
Revago20141004 gerard - gods wijsheid die leidt naar succesRevago20141004 gerard - gods wijsheid die leidt naar succes
Revago20141004 gerard - gods wijsheid die leidt naar succes
 
ATN utk Kedokteran
ATN utk KedokteranATN utk Kedokteran
ATN utk Kedokteran
 
スマートウォッチってどうなん
スマートウォッチってどうなんスマートウォッチってどうなん
スマートウォッチってどうなん
 
Revago20141004 goswin - gods genade zwart op wit
Revago20141004 goswin - gods genade zwart op witRevago20141004 goswin - gods genade zwart op wit
Revago20141004 goswin - gods genade zwart op wit
 
Warner Robins MSA: Potential Market for Industry and Technology Corridor
Warner Robins MSA:  Potential Market for Industry and Technology CorridorWarner Robins MSA:  Potential Market for Industry and Technology Corridor
Warner Robins MSA: Potential Market for Industry and Technology Corridor
 
Shot types
Shot typesShot types
Shot types
 
Ch. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13FCh. 10 FIT5, CIS 110 13F
Ch. 10 FIT5, CIS 110 13F
 
Radiografi zae
Radiografi zaeRadiografi zae
Radiografi zae
 
Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)
Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)
Jリーグ.jpの舞台裏(20151021 JAWS-UG 京都 #5)
 
Civil Rights: Historical View
Civil Rights: Historical ViewCivil Rights: Historical View
Civil Rights: Historical View
 
Digipack 3rd draft
Digipack 3rd draftDigipack 3rd draft
Digipack 3rd draft
 
Advertstar Performance based affiliate platform Presentation 2015
Advertstar Performance based affiliate platform Presentation 2015Advertstar Performance based affiliate platform Presentation 2015
Advertstar Performance based affiliate platform Presentation 2015
 
Avoiding top 5 reasons online videos fail
Avoiding top 5 reasons online videos failAvoiding top 5 reasons online videos fail
Avoiding top 5 reasons online videos fail
 
Mfv ren ch.4
Mfv ren ch.4Mfv ren ch.4
Mfv ren ch.4
 
Kasvatuskumppanuus
KasvatuskumppanuusKasvatuskumppanuus
Kasvatuskumppanuus
 

Similar to Ch. 3 HTML5, CIS 110 13F

Cis145 03 configuring-withcss
Cis145 03 configuring-withcssCis145 03 configuring-withcss
Cis145 03 configuring-withcssNicole77777
 
Chapter 3 - Web Design
Chapter 3 - Web DesignChapter 3 - Web Design
Chapter 3 - Web Designtclanton4
 
Chapter3
Chapter3Chapter3
Chapter3cpashke
 
Web Design Chapter3
Web Design Chapter3Web Design Chapter3
Web Design Chapter3cpashke
 
New Css style
New Css styleNew Css style
New Css styleBUDNET
 
Chapter 6 - Web Design
Chapter 6 - Web DesignChapter 6 - Web Design
Chapter 6 - Web Designtclanton4
 
Ch. 2 HTML5, CIS 110 13F
Ch. 2 HTML5, CIS 110 13FCh. 2 HTML5, CIS 110 13F
Ch. 2 HTML5, CIS 110 13Fmh-108
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1Jesus Obenita Jr.
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdfwubiederebe1
 
cascading style sheet(css).pptx
cascading style sheet(css).pptxcascading style sheet(css).pptx
cascading style sheet(css).pptxSuhaibKhan62
 
Teched Inetrgation ppt and lering in simple
Teched Inetrgation ppt  and lering in simpleTeched Inetrgation ppt  and lering in simple
Teched Inetrgation ppt and lering in simpleJagadishBabuParri
 
DSC, html and CSS basics.pptx
DSC, html and CSS basics.pptxDSC, html and CSS basics.pptx
DSC, html and CSS basics.pptxDiffouoFopaEsdras
 
Shyam sunder Rajasthan Computer
Shyam sunder Rajasthan ComputerShyam sunder Rajasthan Computer
Shyam sunder Rajasthan Computershyamverma305
 
Chapter 7 - Web Design
Chapter 7 - Web DesignChapter 7 - Web Design
Chapter 7 - Web Designtclanton4
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxGmachImen
 

Similar to Ch. 3 HTML5, CIS 110 13F (20)

Cis145 03 configuring-withcss
Cis145 03 configuring-withcssCis145 03 configuring-withcss
Cis145 03 configuring-withcss
 
Chapter 3 - Web Design
Chapter 3 - Web DesignChapter 3 - Web Design
Chapter 3 - Web Design
 
Chapter3
Chapter3Chapter3
Chapter3
 
Web Design Chapter3
Web Design Chapter3Web Design Chapter3
Web Design Chapter3
 
Css
CssCss
Css
 
New Css style
New Css styleNew Css style
New Css style
 
Chapter 6 - Web Design
Chapter 6 - Web DesignChapter 6 - Web Design
Chapter 6 - Web Design
 
Ch. 2 HTML5, CIS 110 13F
Ch. 2 HTML5, CIS 110 13FCh. 2 HTML5, CIS 110 13F
Ch. 2 HTML5, CIS 110 13F
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
 
Chapter3
Chapter3Chapter3
Chapter3
 
Unit iii css and javascript 1
Unit iii css and javascript 1Unit iii css and javascript 1
Unit iii css and javascript 1
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
 
Chapter 3 - CSS.pdf
Chapter 3 - CSS.pdfChapter 3 - CSS.pdf
Chapter 3 - CSS.pdf
 
Unit 2.1
Unit 2.1Unit 2.1
Unit 2.1
 
cascading style sheet(css).pptx
cascading style sheet(css).pptxcascading style sheet(css).pptx
cascading style sheet(css).pptx
 
Teched Inetrgation ppt and lering in simple
Teched Inetrgation ppt  and lering in simpleTeched Inetrgation ppt  and lering in simple
Teched Inetrgation ppt and lering in simple
 
DSC, html and CSS basics.pptx
DSC, html and CSS basics.pptxDSC, html and CSS basics.pptx
DSC, html and CSS basics.pptx
 
Shyam sunder Rajasthan Computer
Shyam sunder Rajasthan ComputerShyam sunder Rajasthan Computer
Shyam sunder Rajasthan Computer
 
Chapter 7 - Web Design
Chapter 7 - Web DesignChapter 7 - Web Design
Chapter 7 - Web Design
 
Lecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptxLecture 3CSS part 1.pptx
Lecture 3CSS part 1.pptx
 

More from mh-108

Ch. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13FCh. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13Fmh-108
 
Ch. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13FCh. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13Fmh-108
 
Ch. 4 FIT5, CIS 110 13F
Ch. 4 FIT5, CIS 110 13FCh. 4 FIT5, CIS 110 13F
Ch. 4 FIT5, CIS 110 13Fmh-108
 
Ch. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13FCh. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13Fmh-108
 
Ch. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13FCh. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13Fmh-108
 
Ch. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13FCh. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13Fmh-108
 
Ch. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13FCh. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13Fmh-108
 
FIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13FFIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13Fmh-108
 

More from mh-108 (8)

Ch. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13FCh. 17 FIT5, CIS 110 13F
Ch. 17 FIT5, CIS 110 13F
 
Ch. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13FCh. 15 FIT5, CIS 110 13F
Ch. 15 FIT5, CIS 110 13F
 
Ch. 4 FIT5, CIS 110 13F
Ch. 4 FIT5, CIS 110 13FCh. 4 FIT5, CIS 110 13F
Ch. 4 FIT5, CIS 110 13F
 
Ch. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13FCh. 12 FIT5, CIS 110 13F
Ch. 12 FIT5, CIS 110 13F
 
Ch. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13FCh. 8 FIT5, CIS 110 13F
Ch. 8 FIT5, CIS 110 13F
 
Ch. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13FCh. 1 HTML5, CIS 110 13F
Ch. 1 HTML5, CIS 110 13F
 
Ch. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13FCh. 3 FIT5, CIS 110 13F
Ch. 3 FIT5, CIS 110 13F
 
FIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13FFIT5 Ch. 5, CIS 110 13F
FIT5 Ch. 5, CIS 110 13F
 

Recently uploaded

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

Ch. 3 HTML5, CIS 110 13F

  • 1. WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 3 Key Concepts Copyright © Terry Felke-Morris Wednesday, October 23, 13 1
  • 2. LEARNING OUTCOMES  Apply inline, embedded (aka internal), external style sheets  Configure element, class, id, and contextual selectors  Use the W3C CSS Validator Copyright © Terry Felke-Morris Wednesday, October 23, 13 2
  • 3. CASCADING STYLE SHEETS (CSS)  CSS Demo: http://www.csszengarden.com  CSS:  Desktop publishing style sheet technology for Web Dev  W3C standard => cross-platform Copyright © Terry Felke-Morris Wednesday, October 23, 13 3
  • 4. CSS ADVANTAGES Separates style (CSS) from structure (HTML) Styles can be stored in a separate file => Easier site maintenance Copyright © Terry Felke-Morris Wednesday, October 23, 13 4
  • 5. TYPES OF CASCADING STYLE SHEETS (1) External Embedded (aka Internal) Inline Copyright © Terry Felke-Morris Wednesday, October 23, 13 5
  • 6.  Inline Styles CASCADING STYLE SHEETS ◦ body section ◦ HTML style attribute ◦ applies to one element  Embedded/Internal Styles ◦ head section ◦ HTML style element ◦ applies to entire web page  External Styles ◦ Separate .css file ◦ Connect to web page w/link element in head section Copyright © Terry Felke-Morris Wednesday, October 23, 13 6
  • 7. CSS SYNTAX  Style sheets are composed of Style Rules  Style Rule: Selector & Declaration Copyright © Terry Felke-Morris Wednesday, October 23, 13 7
  • 8. CSS Example Web page w/ blue text, yellow background: body { color: blue; background-color: yellow; } OR use HEX triple color codes (ch. 7-8, FIT5): body { color: #0000FF; background-color: #FFFF00; } Copyright © Terry Felke-Morris Wednesday, October 23, 13 8
  • 9. COMMON CSS PROPERTIES  Table 3.1 Common CSS Properties: ◦ background-color ◦ color ◦ font-family ◦ font-size ◦ font-style ◦ font-weight ◦ line-height ◦ margin ◦ text-align ◦ text-decoration ◦ width Copyright © Terry Felke-Morris Wednesday, October 23, 13 9
  • 10. USING COLOR ON WEB PAGES monitors display color as intensities of Red/Green/Blue light RGB values 0 .. 255 Hexadecimal numbers (base 16) are shorthand notation: 0 .. 255 == 00 .. FF Copyright © Terry Felke-Morris Wednesday, October 23, 13 10
  • 11. HEXADECIMAL COLOR VALUES  # indicates hex digits  Hex pairs 00 .. FF  Three hex pairs => RGB as HEX TRIPLE #000000 black #FFFFFF white #FF0000 red #00FF00 green #0000FF blue #CCCCCC grey Copyright © Terry Felke-Morris Wednesday, October 23, 13 11
  • 12. INLINE CSS  Inline CSS  Style Attribute Example: <h1 style="color:#ff0000">Heading text is red</h1> Copyright © Terry Felke-Morris Wednesday, October 23, 13 14
  • 13. CSS EMBEDDED/INTERNAL STYLES  Style element in head section => Internal Style Sheet  Rules apply to entire web page <style> body { background-color: #000000; color: #FFFFFF; } </style> Copyright © Terry Felke-Morris Wednesday, October 23, 13 16
  • 14. CSS properties for configuring text:  font-weight  font-style  font-size  font-family Copyright © Terry Felke-Morris Wednesday, October 23, 13 19
  • 15. THE FONT-FAMILY PROPERTY p {font-family: Arial, Verdana, “Courier New”, sans-serif;} Copyright © Terry Felke-Morris Wednesday, October 23, 13 21
  • 16. CSS SELECTORS simple selector => selects html element(s) class selector => selects "class" of elements id selector => selects ONE element on a web page  contextual selector (aka descendent) => selects all nested elements Copyright © Terry Felke-Morris Wednesday, October 23, 13 23
  • 17. USING CSS WITH “CLASS” Define the class: <style> .new { color: #FF0000; font-style: italic; } </style> Apply the class: <p class=“new”>This is text is red and in italics</p> <h4 class=“new”>More Red Italics</h4> Copyright © Terry Felke-Morris Wednesday, October 23, 13 24
  • 18. USING ID SELECTORS Define the id Selector: Web Field Trip: octothorn, octalthorp, octatherp, octothorpe (#) <style> #new { color: #FF0000; font-size:2em; font-style: italic; } </style> Apply the id selector: <p id=“new”>This is text is red, large, and in italics</p> Copyright © Terry Felke-Morris Wednesday, October 23, 13 25
  • 19. CONTEXTUAL SELECTOR Select element within context of its container (parent) element. AKA descendent selector example applies only to <style> #footer a { color: green; } </style> links located w/in element tagged id=’footer’ Copyright © Terry Felke-Morris Wednesday, October 23, 13 26
  • 20. SPAN ELEMENT Purpose: style content inline no empty space above/below a span inline display, not block display Copyright © Terry Felke-Morris Wednesday, October 23, 13 27
  • 21. SPAN ELEMENT EXAMPLE <style> .companyname { font-weight: bold; font-size: larger; } </style> <p>Your needs are important to us at <span class=“companyname">Acme Web Design</span>. We will work with you to build your Web site.</p> Copyright © Terry Felke-Morris Wednesday, October 23, 13 28
  • 22. EXTERNAL STYLE SHEETS CSS style rules stored in a .css file  may contain style rules only  may not contain any HTML tags Copyright © Terry Felke-Morris Wednesday, October 23, 13 29
  • 23. EXTERNAL STYLE SHEETS 2 Multiple web pages can associate with the same external style sheet file. site.css body {background-color:#E6E6FA; color:#000000; font-family:Arial, sans-serif; font-size:90%; } h2 { color: #003366; } .nav { font-size: 16px; font-weight: bold; } index.html clients.html about.html Etc… Copyright © Terry Felke-Morris Wednesday, October 23, 13 30
  • 24. EXAMPLE External Style Sheet: color.css body { background-color: #0000FF; color: #FFFFFF; } To link 110/p3/demo.html to 110/css/color.css: <head> <link rel="stylesheet" href="../css/color.css"> </head> Copyright © Terry Felke-Morris Wednesday, October 23, 13 32
  • 25. CENTERING PAGE CONTENT WITH CSS #container { margin-left: auto; margin-right: auto; width:80%; } Example: services.html Copyright © Terry Felke-Morris Wednesday, October 23, 13 34
  • 26. THE “CASCADE” Copyright © Terry Felke-Morris Wednesday, October 23, 13 35
  • 27. W3C CSS VALIDATION  http://jigsaw.w3.org/css-validator/ Copyright © Terry Felke-Morris Wednesday, October 23, 13 36
  • 28. Ch. 3 Assessment: Learning Outcomes - Know the following Copyright © Terry Felke-Morris Wednesday, October 23, 13 37
  • 29. Ch. 3 Assessment: Learning Outcomes - Know the following Copyright © Terry Felke-Morris Wednesday, October 23, 13 37