SlideShare une entreprise Scribd logo
1  sur  29
Télécharger pour lire hors ligne
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

Contenu connexe

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Plus de 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
 

Plus de 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
 

Dernier

ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?Mark Billinghurst
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentationyogeshlabana357357
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingScyllaDB
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessUXDXConf
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctBrainSell Technologies
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform EngineeringMarcus Vechiato
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?Paolo Missier
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024Stephen Perrenod
 

Dernier (20)

ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
The Metaverse: Are We There Yet?
The  Metaverse:    Are   We  There  Yet?The  Metaverse:    Are   We  There  Yet?
The Metaverse: Are We There Yet?
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Event-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream ProcessingEvent-Driven Architecture Masterclass: Challenges in Stream Processing
Event-Driven Architecture Masterclass: Challenges in Stream Processing
 
Structuring Teams and Portfolios for Success
Structuring Teams and Portfolios for SuccessStructuring Teams and Portfolios for Success
Structuring Teams and Portfolios for Success
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
(Explainable) Data-Centric AI: what are you explaininhg, and to whom?
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 

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