SlideShare ist ein Scribd-Unternehmen logo
1 von 42
Downloaden Sie, um offline zu lesen
Introduction to CSS
Web Development 101
Lesson 01.02
What you already know
What is “The Web”
What is HTML
What is a DOM
Why the web matters as a technology
What we’ll learn
How to change the appearance of HTML
How to control page layout
How to make a single web page look great on multiple devices
au·to·mo·bile
Noun
A road vehicle, typically with four wheels,
powered by an internal combustion engine or
electric motor and able to carry a small number
of people.
Automobile = (Chair + 4 Wheels + Engine)
Early Feature Creep	
Air conditioning

Heated / Cooled Seats

Radio

Tire pressure monitors

Tape Player

Automatic transmission

CD Player

Bluetooth Phone Integration

MP3 Player

Laser Assisted Cruise Control

GPS Navigation

Automatic parallel parking?
Web = (HTML Documents + Hyper Links + Browser)
Web Feature Creep
Pictures

AJAX

Complex layouts

Authenticated User Sessions

Animation

Single Page Applications

Interactivity
Streaming Audio and Video
Forms
A programmer’s job is to manage complexity.
Tools for managing complexity
Modules: separate code into pieces by subject and concern
Layers: abstract complexity into layers. Higher layers build on top of lower
layers. Lower layers hide complexity from higher layers.
Declarative programming: name code by what it accomplishes, not how
it accomplishes it.
parfait

The Web is an onion
Client Side Stack
HTML — Document Content and Structure
CSS — Visual Presentation
Javascript/ECMAScript — Interactivity
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Anatomy of a CSS Rule
.blogPost {
font-size: 13px;
font-family: Helvetica, Arial, sans-serif;
color: #333;
}
Discuss 01.02.01
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
</head>
<body>
<h1>My First Webpage</h1>
<p>Lorem Ipsum</p>
</body>
</html>

html {
font: 13px/1.5 Helvetica, Arial;
color: #333;
}
h1 {
color: #FF0000;
font-size: 20px;
}
Selectors query the DOM
p { ... }

header p { ... }

h1 { ... }

#elem a { ... }

#myElem { ... }

a[href="http://www.jw.org"] { ... }

.someClass { ... }

a:hover { ... }

#parent > .someClass { ... }

a:focus { ... }
Colors are numeric
Colors are 3 or 6 digit hexadecimal numbers.
#FFF, #3FA2BF, #2F798F
Hexadecimal is base-16. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
One digit is 4 bits (1 nibble, half an octet)
A color is 3 octets (24 bits). 8 bits for each Red, Green, Blue.
BONUS: How many distinct colors can be represented?
#FFFFFF
#000000
#006600
#CC0000

LORIM
LORIM
LORIM
LORIM

IPSUM
IPSUM
IPSUM
IPSUM
Basic Properties
background-color: #FFF;
background-image: url(‘...’);
background-repeat: no-repeat;
border: 1px solid #FFF;
display: block;
font-family: Palatino, Georgia, serif;
font-size: 15px;
font-style: italic;
font-weight: bold;
left: 50px;
margin: 1em 2em 1em 2em;
height: 5em;
max-height: 500px;

max-width: 960px;
min-height: 200px;
min-width: 20em;
opacity: 0.5;
overflow: hidden;
padding: 1em 2em 1em 2em;
position: relative;
right: 20px;
text-align: left;
text-decoration: underline;
width: 400px;
z-index: 4000;
Basic Properties
background-color: #FFF;
background-image: url(‘...’);
background-repeat: no-repeat;
border: 1px solid #FFF;
display: block;
font-family: Palatino, Georgia, serif;
font-size: 15px;
font-style: italic;
font-weight: bold;
left: 50px;
margin: 1em 2em 1em 2em;
height: 5em;
max-height: 500px;

max-width: 960px;
min-height: 200px;
min-width: 20em;
opacity: 0.5;
overflow: hidden;
padding: 1em 2em 1em 2em;
position: relative;
right: 20px;
text-align: left;
text-decoration: underline;
width: 400px;
z-index: 4000;
CSS Box Model
OR
How every element on a web page is a rectangle
Experiment: Chrome Dev Tools
* {
border: 1px solid red !important;
}
Box Model Property Shorthand
#myBox {
top right bottom left
margin: 10px 20px 30px
40px;
}
#yourBox {
margin-top: 10px;
margin-right: 20px;
margin-bottom: 30px;
margin-left: 40px;
}
Dimensions
Pixels (px) are the smallest possible unit on a screen
Percents (%) allow sizing based on the size of the parent container
Ems (em) are equal to the font-size of the parent element
Generally use pixels for fonts & borders. Percents and Ems for layout
Designs must re-ïŹ‚ow with the screen. Fixed width is bad practice.
Review
What is CSS?
How do selectors work?
How do you specify colors in CSS?
Whats the box model?
According to the box model, what order is spacing applied in?
What units are available for dimensions?
Discuss 01.02.02
What selector would you use to...
Select the top-level element in the document
Select the `<div>` element with the `container` class
Select all of the links in the document
Select the element with the ID of `title`
Discuss 01.02.03
What elements are being selected?
What colors are being used? How do colors work in CSS?
What kind of font and font styling are being applied?
Whats the diïŹ€erence between width and max-width?
What is margin and padding? How are the similar? How are they diïŹ€erent?
Short-hand vs. Long-hand CSS?
Why deïŹne the width as a percentage instead of in pixels?
What fonts can you use in CSS? Why are there multiple?
Activity 01.02.03
Customize example 01.02.03 in Chrome Dev Tools.
Change the color on the page to match the color clothing you're
currently wearing.
Increase the font size and change the font style to something with serifs.
Change the distribution of spacing on the page to something you think is
more readable.
Make the ïŹrst line of a paragraph indented.
Activity 01.02.04
Genesis 1—3 as HTML in project_work folder
Write CSS to:
Make each chapter display as a column
Improve the typography
Improve the colors
Make sizing / spacing more readable
Bonus: Use Media Queries to change layout based on screen width
Homework 01.02
Review: Read Web-Fundamentals-CSS.epub
Get creative: Write CSS for Alice in Wonderland
It should be readable on any screen size
Headings, poems, and paragraphs should be discernible by a visual hierarchy
Too much contrast in colors (text color vs. background color) is diïŹƒcult to read,
but so is too little.
Tomorrow morning: compare CSS styling of Alice in Wonderland.
What challenges did you face? What did you learn?

Weitere Àhnliche Inhalte

Was ist angesagt?

Web Design 101
Web Design 101Web Design 101
Web Design 101vegdwk
 
EPUB Boot Camp: Tips and Tweaks
EPUB Boot Camp: Tips and TweaksEPUB Boot Camp: Tips and Tweaks
EPUB Boot Camp: Tips and TweaksBookNet Canada
 
Le Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursLe Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursSandrine Ayral
 
TMW Code Club – Session 2 - CSS Basics
TMW Code Club – Session 2 - CSS BasicsTMW Code Club – Session 2 - CSS Basics
TMW Code Club – Session 2 - CSS Basicsnolly00
 
Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...Patrick Lauke
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSSBoris Paillard
 
Web Accessibility Gone Wild
Web Accessibility Gone WildWeb Accessibility Gone Wild
Web Accessibility Gone WildJared Smith
 
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011Georgiana Laudi
 
CSS Fundamentals
CSS FundamentalsCSS Fundamentals
CSS FundamentalsRay Villalobos
 
Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors. Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors. The University of Akron
 
Shaping Up With CSS
Shaping Up With CSSShaping Up With CSS
Shaping Up With CSSsdireland
 
The ABCs of HTML
The ABCs of HTMLThe ABCs of HTML
The ABCs of HTMLMeagan Hanes
 
Bad design features
Bad design featuresBad design features
Bad design featuresISM
 
Child Theming: An Introduction to Wordpress Theme Development with Wordpres...
Child Theming: An Introduction to  Wordpress Theme Development  with Wordpres...Child Theming: An Introduction to  Wordpress Theme Development  with Wordpres...
Child Theming: An Introduction to Wordpress Theme Development with Wordpres...Aban Nesta
 
Typography For The Web
Typography For The WebTypography For The Web
Typography For The WebChristy Gurga
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursYannKlein2
 
Epub in the wild
Epub in the wildEpub in the wild
Epub in the wildliz_castro
 
Wordcamp rochester-2017-accessibility-johnson-steigelman
Wordcamp rochester-2017-accessibility-johnson-steigelmanWordcamp rochester-2017-accessibility-johnson-steigelman
Wordcamp rochester-2017-accessibility-johnson-steigelmanH. Trevor Johnson-Steigelman
 

Was ist angesagt? (20)

Web Design 101
Web Design 101Web Design 101
Web Design 101
 
EPUB Boot Camp: Tips and Tweaks
EPUB Boot Camp: Tips and TweaksEPUB Boot Camp: Tips and Tweaks
EPUB Boot Camp: Tips and Tweaks
 
Le Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hoursLe Wagon - Build your Landing Page in 2 hours
Le Wagon - Build your Landing Page in 2 hours
 
TMW Code Club – Session 2 - CSS Basics
TMW Code Club – Session 2 - CSS BasicsTMW Code Club – Session 2 - CSS Basics
TMW Code Club – Session 2 - CSS Basics
 
Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...Web standards pragmatism - from validation to the real world / Web Developers...
Web standards pragmatism - from validation to the real world / Web Developers...
 
Building Layouts with CSS
Building Layouts with CSSBuilding Layouts with CSS
Building Layouts with CSS
 
CSS
CSSCSS
CSS
 
Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
Web Accessibility Gone Wild
Web Accessibility Gone WildWeb Accessibility Gone Wild
Web Accessibility Gone Wild
 
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
Moving from Wordpress.com to Wordpress.org - Wordcamp Toronto 2011
 
CSS Fundamentals
CSS FundamentalsCSS Fundamentals
CSS Fundamentals
 
Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors. Managing responsive websites with css preprocessors.
Managing responsive websites with css preprocessors.
 
Shaping Up With CSS
Shaping Up With CSSShaping Up With CSS
Shaping Up With CSS
 
The ABCs of HTML
The ABCs of HTMLThe ABCs of HTML
The ABCs of HTML
 
Bad design features
Bad design featuresBad design features
Bad design features
 
Child Theming: An Introduction to Wordpress Theme Development with Wordpres...
Child Theming: An Introduction to  Wordpress Theme Development  with Wordpres...Child Theming: An Introduction to  Wordpress Theme Development  with Wordpres...
Child Theming: An Introduction to Wordpress Theme Development with Wordpres...
 
Typography For The Web
Typography For The WebTypography For The Web
Typography For The Web
 
Le Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hoursLe Wagon Tokyo | Build your Landing Page in 2 hours
Le Wagon Tokyo | Build your Landing Page in 2 hours
 
Epub in the wild
Epub in the wildEpub in the wild
Epub in the wild
 
Wordcamp rochester-2017-accessibility-johnson-steigelman
Wordcamp rochester-2017-accessibility-johnson-steigelmanWordcamp rochester-2017-accessibility-johnson-steigelman
Wordcamp rochester-2017-accessibility-johnson-steigelman
 

Andere mochten auch

Lesson 15
Lesson 15Lesson 15
Lesson 15Gene Babon
 
Workshop 1 - User eXperience evaluation
Workshop 1 - User eXperience evaluationWorkshop 1 - User eXperience evaluation
Workshop 1 - User eXperience evaluationSĂłnia
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2SĂłnia
 
Css ms megha
Css ms meghaCss ms megha
Css ms meghaMegha Gupta
 
How To SASS - af morningtrain.dk
How To SASS - af morningtrain.dkHow To SASS - af morningtrain.dk
How To SASS - af morningtrain.dkMorning Train
 
Trust workshop
Trust workshopTrust workshop
Trust workshopSĂłnia
 
Lesson 15
Lesson 15Lesson 15
Lesson 15Gene Babon
 
HTML Lesson 1
HTML Lesson 1HTML Lesson 1
HTML Lesson 1TonyC445
 
Developing Interactive systems - lesson 2
Developing Interactive systems - lesson 2Developing Interactive systems - lesson 2
Developing Interactive systems - lesson 2SĂłnia
 
Ifi7184 lesson3
Ifi7184 lesson3Ifi7184 lesson3
Ifi7184 lesson3SĂłnia
 
Ifi7174 lesson4
Ifi7174 lesson4Ifi7174 lesson4
Ifi7174 lesson4SĂłnia
 
Lesson 04
Lesson 04Lesson 04
Lesson 04Gene Babon
 
Lesson 11
Lesson 11Lesson 11
Lesson 11Gene Babon
 
CSS for designers - Lesson 1 - HTML
CSS for designers - Lesson 1 - HTMLCSS for designers - Lesson 1 - HTML
CSS for designers - Lesson 1 - HTMLIdan Segev
 
IFI7184.DT lesson1- Programming languages
IFI7184.DT lesson1- Programming languagesIFI7184.DT lesson1- Programming languages
IFI7184.DT lesson1- Programming languagesSĂłnia
 
Lesson 03
Lesson 03Lesson 03
Lesson 03Gene Babon
 
Ifi7174 lesson3
Ifi7174 lesson3Ifi7174 lesson3
Ifi7174 lesson3SĂłnia
 
Lesson 03
Lesson 03Lesson 03
Lesson 03Gene Babon
 
A design space for Trust-enabling Interaction Design
A design space for Trust-enabling Interaction DesignA design space for Trust-enabling Interaction Design
A design space for Trust-enabling Interaction DesignSĂłnia
 

Andere mochten auch (20)

Lesson 15
Lesson 15Lesson 15
Lesson 15
 
Workshop 1 - User eXperience evaluation
Workshop 1 - User eXperience evaluationWorkshop 1 - User eXperience evaluation
Workshop 1 - User eXperience evaluation
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
Css ms megha
Css ms meghaCss ms megha
Css ms megha
 
How To SASS - af morningtrain.dk
How To SASS - af morningtrain.dkHow To SASS - af morningtrain.dk
How To SASS - af morningtrain.dk
 
Trust workshop
Trust workshopTrust workshop
Trust workshop
 
Lesson 15
Lesson 15Lesson 15
Lesson 15
 
HTML Lesson 1
HTML Lesson 1HTML Lesson 1
HTML Lesson 1
 
Developing Interactive systems - lesson 2
Developing Interactive systems - lesson 2Developing Interactive systems - lesson 2
Developing Interactive systems - lesson 2
 
Ifi7184 lesson3
Ifi7184 lesson3Ifi7184 lesson3
Ifi7184 lesson3
 
Ifi7174 lesson4
Ifi7174 lesson4Ifi7174 lesson4
Ifi7174 lesson4
 
Lesson 04
Lesson 04Lesson 04
Lesson 04
 
Lesson 11
Lesson 11Lesson 11
Lesson 11
 
CSS for designers - Lesson 1 - HTML
CSS for designers - Lesson 1 - HTMLCSS for designers - Lesson 1 - HTML
CSS for designers - Lesson 1 - HTML
 
IFI7184.DT lesson1- Programming languages
IFI7184.DT lesson1- Programming languagesIFI7184.DT lesson1- Programming languages
IFI7184.DT lesson1- Programming languages
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
Ifi7174 lesson3
Ifi7174 lesson3Ifi7174 lesson3
Ifi7174 lesson3
 
HTML Lesson 5
HTML Lesson 5HTML Lesson 5
HTML Lesson 5
 
Lesson 03
Lesson 03Lesson 03
Lesson 03
 
A design space for Trust-enabling Interaction Design
A design space for Trust-enabling Interaction DesignA design space for Trust-enabling Interaction Design
A design space for Trust-enabling Interaction Design
 

Ähnlich wie 01 Introduction To CSS

Responsive Web Design & Typography
Responsive Web Design & TypographyResponsive Web Design & Typography
Responsive Web Design & TypographyDanny Calders
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1Heather Rock
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web DesignMario Hernandez
 
Controlling Web Typography
Controlling Web TypographyControlling Web Typography
Controlling Web TypographyTrent Walton
 
The Language of the Web - HTML and CSS
The Language of the Web - HTML and CSSThe Language of the Web - HTML and CSS
The Language of the Web - HTML and CSSkcasavale
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Hatem Mahmoud
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyWordCamp Sydney
 
How do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksHow do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksCompare Infobase Limited
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web DesignClarissa Peterson
 
Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)Thinkful
 
Making Your Own CSS Framework
Making Your Own CSS FrameworkMaking Your Own CSS Framework
Making Your Own CSS FrameworkDan Sagisser
 
Worry free web development
Worry free web developmentWorry free web development
Worry free web developmentEstelle Weyl
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSSAndy Budd
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSLarry King
 
Making Your Site Look Great in IE7
Making Your Site Look Great in IE7Making Your Site Look Great in IE7
Making Your Site Look Great in IE7goodfriday
 

Ähnlich wie 01 Introduction To CSS (20)

Responsive Web Design & Typography
Responsive Web Design & TypographyResponsive Web Design & Typography
Responsive Web Design & Typography
 
GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1GDI Seattle Intermediate HTML and CSS Class 1
GDI Seattle Intermediate HTML and CSS Class 1
 
Lecture-7.pptx
Lecture-7.pptxLecture-7.pptx
Lecture-7.pptx
 
Responsive Web Design
Responsive Web DesignResponsive Web Design
Responsive Web Design
 
Controlling Web Typography
Controlling Web TypographyControlling Web Typography
Controlling Web Typography
 
The Language of the Web - HTML and CSS
The Language of the Web - HTML and CSSThe Language of the Web - HTML and CSS
The Language of the Web - HTML and CSS
 
Web 101
Web 101Web 101
Web 101
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
 
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp SydneyGetting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
Getting to Grips with Firebug - Anthony Hortin - WordCamp Sydney
 
How do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML TricksHow do speed up web pages? CSS & HTML Tricks
How do speed up web pages? CSS & HTML Tricks
 
Introduction to Responsive Web Design
Introduction to Responsive Web DesignIntroduction to Responsive Web Design
Introduction to Responsive Web Design
 
Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)Responsive Web Design (April 18th, Los Angeles)
Responsive Web Design (April 18th, Los Angeles)
 
Rakshat bhati
Rakshat bhatiRakshat bhati
Rakshat bhati
 
Making Your Own CSS Framework
Making Your Own CSS FrameworkMaking Your Own CSS Framework
Making Your Own CSS Framework
 
Worry free web development
Worry free web developmentWorry free web development
Worry free web development
 
The Future Of CSS
The Future Of CSSThe Future Of CSS
The Future Of CSS
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Intro to CSS
Intro to CSSIntro to CSS
Intro to CSS
 
Making Your Site Look Great in IE7
Making Your Site Look Great in IE7Making Your Site Look Great in IE7
Making Your Site Look Great in IE7
 
David Weliver
David WeliverDavid Weliver
David Weliver
 

Mehr von crgwbr

Lightning Talk: Making JS better with Browserify
Lightning Talk: Making JS better with BrowserifyLightning Talk: Making JS better with Browserify
Lightning Talk: Making JS better with Browserifycrgwbr
 
07 Integration Project Part 1
07 Integration Project Part 107 Integration Project Part 1
07 Integration Project Part 1crgwbr
 
06 Map Reduce
06 Map Reduce06 Map Reduce
06 Map Reducecrgwbr
 
05 Web Services
05 Web Services05 Web Services
05 Web Servicescrgwbr
 
04 Advanced Javascript
04 Advanced Javascript04 Advanced Javascript
04 Advanced Javascriptcrgwbr
 
03 Web Events and jQuery
03 Web Events and jQuery03 Web Events and jQuery
03 Web Events and jQuerycrgwbr
 
02 Introduction to Javascript
02 Introduction to Javascript02 Introduction to Javascript
02 Introduction to Javascriptcrgwbr
 
08 Integration Project Part 2
08 Integration Project Part 208 Integration Project Part 2
08 Integration Project Part 2crgwbr
 

Mehr von crgwbr (8)

Lightning Talk: Making JS better with Browserify
Lightning Talk: Making JS better with BrowserifyLightning Talk: Making JS better with Browserify
Lightning Talk: Making JS better with Browserify
 
07 Integration Project Part 1
07 Integration Project Part 107 Integration Project Part 1
07 Integration Project Part 1
 
06 Map Reduce
06 Map Reduce06 Map Reduce
06 Map Reduce
 
05 Web Services
05 Web Services05 Web Services
05 Web Services
 
04 Advanced Javascript
04 Advanced Javascript04 Advanced Javascript
04 Advanced Javascript
 
03 Web Events and jQuery
03 Web Events and jQuery03 Web Events and jQuery
03 Web Events and jQuery
 
02 Introduction to Javascript
02 Introduction to Javascript02 Introduction to Javascript
02 Introduction to Javascript
 
08 Integration Project Part 2
08 Integration Project Part 208 Integration Project Part 2
08 Integration Project Part 2
 

KĂŒrzlich hochgeladen

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 

KĂŒrzlich hochgeladen (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 

01 Introduction To CSS

  • 1. Introduction to CSS Web Development 101 Lesson 01.02
  • 2. What you already know What is “The Web” What is HTML What is a DOM Why the web matters as a technology
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. What we’ll learn How to change the appearance of HTML How to control page layout How to make a single web page look great on multiple devices
  • 8. au·to·mo·bile Noun A road vehicle, typically with four wheels, powered by an internal combustion engine or electric motor and able to carry a small number of people.
  • 9. Automobile = (Chair + 4 Wheels + Engine)
  • 10. Early Feature Creep Air conditioning Heated / Cooled Seats Radio Tire pressure monitors Tape Player Automatic transmission CD Player Bluetooth Phone Integration MP3 Player Laser Assisted Cruise Control GPS Navigation Automatic parallel parking?
  • 11. Web = (HTML Documents + Hyper Links + Browser)
  • 12. Web Feature Creep Pictures AJAX Complex layouts Authenticated User Sessions Animation Single Page Applications Interactivity Streaming Audio and Video Forms
  • 13. A programmer’s job is to manage complexity.
  • 14. Tools for managing complexity Modules: separate code into pieces by subject and concern Layers: abstract complexity into layers. Higher layers build on top of lower layers. Lower layers hide complexity from higher layers. Declarative programming: name code by what it accomplishes, not how it accomplishes it.
  • 15. parfait The Web is an onion
  • 16. Client Side Stack HTML — Document Content and Structure CSS — Visual Presentation Javascript/ECMAScript — Interactivity
  • 17. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 18. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 19. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 20. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 21. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 22. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 23. Anatomy of a CSS Rule .blogPost { font-size: 13px; font-family: Helvetica, Arial, sans-serif; color: #333; }
  • 24. Discuss 01.02.01 <!DOCTYPE html> <html> <head> <title>Hello World</title> </head> <body> <h1>My First Webpage</h1> <p>Lorem Ipsum</p> </body> </html> html { font: 13px/1.5 Helvetica, Arial; color: #333; } h1 { color: #FF0000; font-size: 20px; }
  • 25. Selectors query the DOM p { ... } header p { ... } h1 { ... } #elem a { ... } #myElem { ... } a[href="http://www.jw.org"] { ... } .someClass { ... } a:hover { ... } #parent > .someClass { ... } a:focus { ... }
  • 26. Colors are numeric Colors are 3 or 6 digit hexadecimal numbers. #FFF, #3FA2BF, #2F798F Hexadecimal is base-16. {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F} One digit is 4 bits (1 nibble, half an octet) A color is 3 octets (24 bits). 8 bits for each Red, Green, Blue. BONUS: How many distinct colors can be represented?
  • 28. Basic Properties background-color: #FFF; background-image: url(‘...’); background-repeat: no-repeat; border: 1px solid #FFF; display: block; font-family: Palatino, Georgia, serif; font-size: 15px; font-style: italic; font-weight: bold; left: 50px; margin: 1em 2em 1em 2em; height: 5em; max-height: 500px; max-width: 960px; min-height: 200px; min-width: 20em; opacity: 0.5; overflow: hidden; padding: 1em 2em 1em 2em; position: relative; right: 20px; text-align: left; text-decoration: underline; width: 400px; z-index: 4000;
  • 29. Basic Properties background-color: #FFF; background-image: url(‘...’); background-repeat: no-repeat; border: 1px solid #FFF; display: block; font-family: Palatino, Georgia, serif; font-size: 15px; font-style: italic; font-weight: bold; left: 50px; margin: 1em 2em 1em 2em; height: 5em; max-height: 500px; max-width: 960px; min-height: 200px; min-width: 20em; opacity: 0.5; overflow: hidden; padding: 1em 2em 1em 2em; position: relative; right: 20px; text-align: left; text-decoration: underline; width: 400px; z-index: 4000;
  • 30. CSS Box Model OR How every element on a web page is a rectangle
  • 31.
  • 32.
  • 33. Experiment: Chrome Dev Tools * { border: 1px solid red !important; }
  • 34.
  • 35. Box Model Property Shorthand #myBox { top right bottom left margin: 10px 20px 30px 40px; } #yourBox { margin-top: 10px; margin-right: 20px; margin-bottom: 30px; margin-left: 40px; }
  • 36. Dimensions Pixels (px) are the smallest possible unit on a screen Percents (%) allow sizing based on the size of the parent container Ems (em) are equal to the font-size of the parent element Generally use pixels for fonts & borders. Percents and Ems for layout Designs must re-ïŹ‚ow with the screen. Fixed width is bad practice.
  • 37. Review What is CSS? How do selectors work? How do you specify colors in CSS? Whats the box model? According to the box model, what order is spacing applied in? What units are available for dimensions?
  • 38. Discuss 01.02.02 What selector would you use to... Select the top-level element in the document Select the `<div>` element with the `container` class Select all of the links in the document Select the element with the ID of `title`
  • 39. Discuss 01.02.03 What elements are being selected? What colors are being used? How do colors work in CSS? What kind of font and font styling are being applied? Whats the diïŹ€erence between width and max-width? What is margin and padding? How are the similar? How are they diïŹ€erent? Short-hand vs. Long-hand CSS? Why deïŹne the width as a percentage instead of in pixels? What fonts can you use in CSS? Why are there multiple?
  • 40. Activity 01.02.03 Customize example 01.02.03 in Chrome Dev Tools. Change the color on the page to match the color clothing you're currently wearing. Increase the font size and change the font style to something with serifs. Change the distribution of spacing on the page to something you think is more readable. Make the ïŹrst line of a paragraph indented.
  • 41. Activity 01.02.04 Genesis 1—3 as HTML in project_work folder Write CSS to: Make each chapter display as a column Improve the typography Improve the colors Make sizing / spacing more readable Bonus: Use Media Queries to change layout based on screen width
  • 42. Homework 01.02 Review: Read Web-Fundamentals-CSS.epub Get creative: Write CSS for Alice in Wonderland It should be readable on any screen size Headings, poems, and paragraphs should be discernible by a visual hierarchy Too much contrast in colors (text color vs. background color) is diïŹƒcult to read, but so is too little. Tomorrow morning: compare CSS styling of Alice in Wonderland. What challenges did you face? What did you learn?