SlideShare a Scribd company logo
http://www.slideshare.net/chadmairn
@cmairn
Virtual Petting Zoo/Discussion
Want to
hangout?
gplus.to/chadmairn
anymeeting.com/chadmairn
How would you describe this?
Agenda
• Learn what CSS does and appreciate its
importance in Web design.
• Recognize and use general CSS grammar
(e.g., syntax, semantics, vocabulary)
• Understand how to link a CSS file to an HTML
document.
• Create a Web designers toolbox.
• Design a basic webpage using CSS.
Draw four lines the same length that
touch, two horizontal and two vertical.
We need to tell computers exactly what we mean!
Source: http://goo.gl/N0gvb
Text inside …
Border: 5px solid red;
Background-color: pink;
Padding: 25px;
Font: 8px/2 arial;
HTML = Content; defines tags etc.
CSS = Presentation; tells browser
how tags should appear.
CSS defines how to display HTML tags.
Styles are normally saved in external .css files. External style sheets
enable you to change the appearance and layout of all the pages in a
Web site, just by editing one single file!
Source: http://www.w3schools.com
Define
widths, heights, colors, marg
ins, padding, borders, backgr
ounds, and type styles with
CSS
Source: http://www.w3schools.com
/*This is a comment*/
p
{
text-align:center;
/*This is another comment*/
color:black;
font-family:arial;
}
CSS Comments
id selector
#para1
{
text-align:center;
color:red;
}
ResultCode
class selector
Result
Code
ColorZilla and other tools …
Adding CSS code to HTML pages
1. External Style Sheet
<head>
<link rel="stylesheet" type="text/css" href="mystyle.css">
</head>
2. Internal Style Sheet
<head>
<style>
hr {color:sienna;}
p {margin-left:20px;}
body {background-image:url("images/back40.gif");}
</style>
</head>
3. Inline Styles
<p style="color:sienna;margin-left:20px">This is a paragraph.</p>
Note: an inline style will override a style defined inside the <head> tag or in an external style
sheet. If the link to the external style sheet is placed after the internal style sheet in HTML
<head>, then the external style sheet will override the internal style sheet!
Source: http://goo.gl/RgDFa
http://www.w3schools.com/cssref/
live demonstration
~ Firebug
~ CSS Generating tools
~ CSS Examples
1. If you don't have an FTP application, then I recommend that you download
and install the following: http://filezilla-project.org/download.php
2. Upload files to your directory (e.g., email address username).
3. When you begin to work with the FTP client, you will need to enter the
following credentials:
•Host: via email
•Username: via email
•Password: via email
A quick screencast video demonstrating how to login using the FileZilla FTP
Client can be found at http://www.youtube.com/watch?v=9VaM_wv0aQ4.
4. You will need either a text editor (TextEdit on mac or Notepad on PC) or a
tool like Dreamweaver.
If you have problems, please contact Chad Mairn at (727) 537-6405 or
at chadmairn@gmail.com.
Uploading Files
Uploading Files via FTP
To test you work visit …
http://marcomponline.com/chadtest/Class/
email username
Homework …
• Create a basic HTML index page (index.html) and include an external style
sheet as well as some inline styles. Experiment with various properties and
values.
• Find an interesting site that uses CSS and modify it for your needs. {Note: try a
search for “CSS exercises” and use whatever interests you.
http://www.w3schools.com/css/css_examples.asp and
http://www.codecademy.com/tracks/htmlcss are great resources! Don’t forget
Firebug!}
• Test and validate your HTML file at http://validator.w3.org/
• Test and validate your CSS file at http://jigsaw.w3.org/css-validator/
• Please take good notes because I’d like to spend some time next week
discussing any issues you may have had using CSS.
Next Week …
• Share with the group good/bad experiences
(e.g., what worked, what didn’t etc.)
• Other coding examples
• Discuss the future of CSS3/Responsive Web Design
• Questions and answers …
How did it go?
Other examples
Styling an e-book with Calibre
RGB and Hex color values: http://cloford.com/resources/colours/500col.htm
CSS pseudo-classes
• used to add special effects to some selectors. Some
examples:
:link - add special style to an unvisited link.
:visited - add special style to a visited link.
:hover - add special style to an element when you mouse over it.
CSS3
• CSS3 is the latest standard for CSS.
• CSS3 is backwards compatible; browsers will support CSS2.
• Some of the most important CSS3 modules are:
– Selectors [HTML (e.g., h2); Class (e.g., .hilight);
– Box Model
– Backgrounds and Borders
– Text Effects
– 2D/3D Transformations
– Animations
– Multiple Column Layout
– User Interface
Source: http://goo.gl/eMQEC
• Try http://css3generator.com/ and http://css3please.com/
Code Result
Adding a box-shadow to a div element
Responsive Web Design
• adapts to the webpage’s layout by using
fluid, proportion-based grids, flexible images, and
CSS3 media queries.
• Three concepts:
• Media queries and media query listeners
• A flexible grid-based layout that uses relative sizing
• Flexible images and media, through dynamic resizing or CSS
Source: http://goo.gl/UQ94d
Caveat: I am just learning RWD!
Media queries and media query listeners
• CSS3 Media queries enable you to style a page based on properties
of the media where the page is being displayed. For example:
@media screen and (max-width:400px)
{ div {border:none;}
}
• The above code limits the scope to viewports (i.e., virtual window;
screen display) which are 400px or less in width.
• Media Query Listeners enable you to execute a script in response to
a change in a media query.
• An example: http://goo.gl/G4fGb
Source: http://goo.gl/G4fGb
A flexible grid-based layout using relative sizing
• ‘non-responsive’ websites have a set width/ fixed
value (e.g., 900px)
• set a relative value as the width then the screen
size is mostly irrelevant. For example:
#content{width: 90%;}
This content area would respond to the screen
size.
Source: http://goo.gl/Sa5nG
Flexible images and media, through dynamic resizing or CSS
• Images are usually set a width and height using
absolute measurements like ‘px’. This is not
flexible.
• Modern browsers are good at maintaining
proportions so the image will resize well as the
layout resizes. For example:
img, embed, object, video
{ max-width: 100%
}
Source: http://goo.gl/VN77O
http://marcomponline.com/chadtest/Class/jjack/
Desktop view
Mobile view – Galaxy S3 (Android)
http://jquerymobile.com/themeroller/
http://www.slideshare.net/chadmairn
@cmairn
Let’s
Hangout!
gplus.to/chadmairn

More Related Content

What's hot

CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
Ana Cidre
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
Seble Nigussie
 
Css
CssCss
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
Sun Technlogies
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
Syed Sami
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
Chris Poteet
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
joilrahat
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
abhilashagupta
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
casestudyhelp
 
Css3
Css3Css3
Html
HtmlHtml
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Seble Nigussie
 
Css ppt
Css pptCss ppt
Css ppt
Nidhi mishra
 
Css Text Formatting
Css Text FormattingCss Text Formatting
Css Text Formatting
Dr. Jasmine Beulah Gnanadurai
 
html-css
html-csshtml-css
Introduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptIntroduction to JavaScript (1).ppt
Introduction to JavaScript (1).ppt
MuhammadRehan856177
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
Mindy McAdams
 

What's hot (20)

CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
Css
CssCss
Css
 
HTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts BasicsHTML, CSS and Java Scripts Basics
HTML, CSS and Java Scripts Basics
 
Intro to HTML & CSS
Intro to HTML & CSSIntro to HTML & CSS
Intro to HTML & CSS
 
CSS
CSSCSS
CSS
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
Html & Css presentation
Html  & Css presentation Html  & Css presentation
Html & Css presentation
 
cascading style sheet ppt
cascading style sheet pptcascading style sheet ppt
cascading style sheet ppt
 
Cascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) helpCascading Style Sheets (CSS) help
Cascading Style Sheets (CSS) help
 
Css3
Css3Css3
Css3
 
Html
HtmlHtml
Html
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Css ppt
Css pptCss ppt
Css ppt
 
Css Text Formatting
Css Text FormattingCss Text Formatting
Css Text Formatting
 
html-css
html-csshtml-css
html-css
 
Introduction to JavaScript (1).ppt
Introduction to JavaScript (1).pptIntroduction to JavaScript (1).ppt
Introduction to JavaScript (1).ppt
 
An Introduction to the DOM
An Introduction to the DOMAn Introduction to the DOM
An Introduction to the DOM
 

Viewers also liked

EIA2016Nice - David Lamas. Paper prototyping: Why, when & how?
EIA2016Nice - David Lamas. Paper prototyping: Why, when & how? EIA2016Nice - David Lamas. Paper prototyping: Why, when & how?
EIA2016Nice - David Lamas. Paper prototyping: Why, when & how?
European Innovation Academy
 
Rapid prototyping and sketching
Rapid prototyping and sketchingRapid prototyping and sketching
Rapid prototyping and sketching
Christian Glover Wilson
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
CloudTech 
 
Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...
Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...
Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...
Philipp Schroeder
 
MHIT 603: Introduction to Prototyping
MHIT 603: Introduction to PrototypingMHIT 603: Introduction to Prototyping
MHIT 603: Introduction to Prototyping
Mark Billinghurst
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
Amit Tyagi
 
Sketching & Prototyping UX (starting with stories)
Sketching & Prototyping UX (starting with stories)Sketching & Prototyping UX (starting with stories)
Sketching & Prototyping UX (starting with stories)
Karl Dotter
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Amit Tyagi
 
Sketching & Prototyping
Sketching & PrototypingSketching & Prototyping
Sketching & Prototyping
Marius Ursache
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
Shawn Calvert
 

Viewers also liked (11)

EIA2016Nice - David Lamas. Paper prototyping: Why, when & how?
EIA2016Nice - David Lamas. Paper prototyping: Why, when & how? EIA2016Nice - David Lamas. Paper prototyping: Why, when & how?
EIA2016Nice - David Lamas. Paper prototyping: Why, when & how?
 
Rapid prototyping and sketching
Rapid prototyping and sketchingRapid prototyping and sketching
Rapid prototyping and sketching
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
 
Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...
Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...
Sketching, Wireframing, Prototyping - How to Be Agile and Avoid Half-Baked Us...
 
MHIT 603: Introduction to Prototyping
MHIT 603: Introduction to PrototypingMHIT 603: Introduction to Prototyping
MHIT 603: Introduction to Prototyping
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Sketching & Prototyping UX (starting with stories)
Sketching & Prototyping UX (starting with stories)Sketching & Prototyping UX (starting with stories)
Sketching & Prototyping UX (starting with stories)
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Sketching & Prototyping
Sketching & PrototypingSketching & Prototyping
Sketching & Prototyping
 
CSS ppt
CSS pptCSS ppt
CSS ppt
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 

Similar to Introducing Cascading Style Sheets

Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflowPeter Kaizer
 
How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014
James Strang
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
Ahmed Haque
 
DHTML
DHTMLDHTML
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.docbutest
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.docbutest
 
025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
RiyaJenner1
 
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
 
Web Publishing terminology 1
Web Publishing terminology 1Web Publishing terminology 1
Web Publishing terminology 1
Beth Lovell
 
25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx
YashMittal302244
 
web development
web developmentweb development
web development
ABHISHEKJHA176786
 
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptDYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
Soumen Santra
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
elayelily
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
silvers5
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
Sun Technlogies
 
Introduction to PrintCSS.live
Introduction to PrintCSS.liveIntroduction to PrintCSS.live
Introduction to PrintCSS.live
Andreas Zettl
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
Osama Ghandour Geris
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
TJ Stalcup
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
Melvin John
 
6 css week12 2020 2021 for g10
6 css week12 2020 2021 for g106 css week12 2020 2021 for g10
6 css week12 2020 2021 for g10
Osama Ghandour Geris
 

Similar to Introducing Cascading Style Sheets (20)

Web design-workflow
Web design-workflowWeb design-workflow
Web design-workflow
 
How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014How to dominate a free theme WCTO 2014
How to dominate a free theme WCTO 2014
 
Intro To Twitter Bootstrap
Intro To Twitter BootstrapIntro To Twitter Bootstrap
Intro To Twitter Bootstrap
 
DHTML
DHTMLDHTML
DHTML
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
Intermediate Web Design.doc
Intermediate Web Design.docIntermediate Web Design.doc
Intermediate Web Design.doc
 
025444215.pptx
025444215.pptx025444215.pptx
025444215.pptx
 
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)
 
Web Publishing terminology 1
Web Publishing terminology 1Web Publishing terminology 1
Web Publishing terminology 1
 
25444215.pptx
25444215.pptx25444215.pptx
25444215.pptx
 
web development
web developmentweb development
web development
 
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScriptDYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
DYNAMIC HYPERTEXT MARKUP LANGUAGE (DHTML) & CSS WITH Application of JavaScript
 
basic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdfbasic programming language AND HTML CSS JAVApdf
basic programming language AND HTML CSS JAVApdf
 
WEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptxWEB DEVELOPMENT.pptx
WEB DEVELOPMENT.pptx
 
Cascading Style Sheets - CSS
Cascading Style Sheets - CSSCascading Style Sheets - CSS
Cascading Style Sheets - CSS
 
Introduction to PrintCSS.live
Introduction to PrintCSS.liveIntroduction to PrintCSS.live
Introduction to PrintCSS.live
 
Css week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandourCss week10 2019 2020 for g10 by eng.osama ghandour
Css week10 2019 2020 for g10 by eng.osama ghandour
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Introduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for DevelopersIntroduction to Bootstrap: Design for Developers
Introduction to Bootstrap: Design for Developers
 
6 css week12 2020 2021 for g10
6 css week12 2020 2021 for g106 css week12 2020 2021 for g10
6 css week12 2020 2021 for g10
 

More from St. Petersburg College

Introducing Immersive Technologies for Libraries
Introducing Immersive Technologies for Libraries  Introducing Immersive Technologies for Libraries
Introducing Immersive Technologies for Libraries
St. Petersburg College
 
Introducing How to Build a Personal Voice Assistant (AIY Edition)
Introducing How to Build a Personal Voice Assistant (AIY Edition) Introducing How to Build a Personal Voice Assistant (AIY Edition)
Introducing How to Build a Personal Voice Assistant (AIY Edition)
St. Petersburg College
 
360° Tours and More
360° Tours and More360° Tours and More
360° Tours and More
St. Petersburg College
 
Taking the Magical Leap with Immersive Technologies in Libraries
Taking the Magical Leap with Immersive Technologies in LibrariesTaking the Magical Leap with Immersive Technologies in Libraries
Taking the Magical Leap with Immersive Technologies in Libraries
St. Petersburg College
 
Open Education Resources in Libraries
Open Education Resources in LibrariesOpen Education Resources in Libraries
Open Education Resources in Libraries
St. Petersburg College
 
How to Repurpose Library Space: Listening Lab Edition
How to Repurpose Library Space: Listening Lab EditionHow to Repurpose Library Space: Listening Lab Edition
How to Repurpose Library Space: Listening Lab Edition
St. Petersburg College
 
Using CoSpaces Edu to Create Virtual and Augmented Reality Experiences
Using CoSpaces Edu to Create Virtual and Augmented Reality ExperiencesUsing CoSpaces Edu to Create Virtual and Augmented Reality Experiences
Using CoSpaces Edu to Create Virtual and Augmented Reality Experiences
St. Petersburg College
 
Understanding Artificial Intelligence
Understanding Artificial IntelligenceUnderstanding Artificial Intelligence
Understanding Artificial Intelligence
St. Petersburg College
 
Web Design Trends: 2018 Edition
Web Design Trends: 2018 EditionWeb Design Trends: 2018 Edition
Web Design Trends: 2018 Edition
St. Petersburg College
 
What’s New With 3D Design and Printing?
What’s New With 3D Design and Printing?What’s New With 3D Design and Printing?
What’s New With 3D Design and Printing?
St. Petersburg College
 
Creating a Program to Assist Users Cutting Cable
Creating a Program to Assist Users Cutting CableCreating a Program to Assist Users Cutting Cable
Creating a Program to Assist Users Cutting Cable
St. Petersburg College
 
Understanding Artificial Intelligence
Understanding Artificial Intelligence Understanding Artificial Intelligence
Understanding Artificial Intelligence
St. Petersburg College
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
St. Petersburg College
 
3D Design Fundamentals
3D Design Fundamentals3D Design Fundamentals
3D Design Fundamentals
St. Petersburg College
 
STEM Demystified
STEM DemystifiedSTEM Demystified
STEM Demystified
St. Petersburg College
 
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBandLearn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
St. Petersburg College
 
Open Education Resources in Libraries
Open Education Resources in LibrariesOpen Education Resources in Libraries
Open Education Resources in Libraries
St. Petersburg College
 
Learning Kodu: Basic Video Game Design for Kids
Learning Kodu: Basic Video Game Design for KidsLearning Kodu: Basic Video Game Design for Kids
Learning Kodu: Basic Video Game Design for Kids
St. Petersburg College
 
Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It! Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It!
St. Petersburg College
 
How to Think in the Information Age: Finding Facts in a Post-Truth World
How to Think in the Information Age: Finding Facts in a Post-Truth WorldHow to Think in the Information Age: Finding Facts in a Post-Truth World
How to Think in the Information Age: Finding Facts in a Post-Truth World
St. Petersburg College
 

More from St. Petersburg College (20)

Introducing Immersive Technologies for Libraries
Introducing Immersive Technologies for Libraries  Introducing Immersive Technologies for Libraries
Introducing Immersive Technologies for Libraries
 
Introducing How to Build a Personal Voice Assistant (AIY Edition)
Introducing How to Build a Personal Voice Assistant (AIY Edition) Introducing How to Build a Personal Voice Assistant (AIY Edition)
Introducing How to Build a Personal Voice Assistant (AIY Edition)
 
360° Tours and More
360° Tours and More360° Tours and More
360° Tours and More
 
Taking the Magical Leap with Immersive Technologies in Libraries
Taking the Magical Leap with Immersive Technologies in LibrariesTaking the Magical Leap with Immersive Technologies in Libraries
Taking the Magical Leap with Immersive Technologies in Libraries
 
Open Education Resources in Libraries
Open Education Resources in LibrariesOpen Education Resources in Libraries
Open Education Resources in Libraries
 
How to Repurpose Library Space: Listening Lab Edition
How to Repurpose Library Space: Listening Lab EditionHow to Repurpose Library Space: Listening Lab Edition
How to Repurpose Library Space: Listening Lab Edition
 
Using CoSpaces Edu to Create Virtual and Augmented Reality Experiences
Using CoSpaces Edu to Create Virtual and Augmented Reality ExperiencesUsing CoSpaces Edu to Create Virtual and Augmented Reality Experiences
Using CoSpaces Edu to Create Virtual and Augmented Reality Experiences
 
Understanding Artificial Intelligence
Understanding Artificial IntelligenceUnderstanding Artificial Intelligence
Understanding Artificial Intelligence
 
Web Design Trends: 2018 Edition
Web Design Trends: 2018 EditionWeb Design Trends: 2018 Edition
Web Design Trends: 2018 Edition
 
What’s New With 3D Design and Printing?
What’s New With 3D Design and Printing?What’s New With 3D Design and Printing?
What’s New With 3D Design and Printing?
 
Creating a Program to Assist Users Cutting Cable
Creating a Program to Assist Users Cutting CableCreating a Program to Assist Users Cutting Cable
Creating a Program to Assist Users Cutting Cable
 
Understanding Artificial Intelligence
Understanding Artificial Intelligence Understanding Artificial Intelligence
Understanding Artificial Intelligence
 
Beginning Python Programming
Beginning Python ProgrammingBeginning Python Programming
Beginning Python Programming
 
3D Design Fundamentals
3D Design Fundamentals3D Design Fundamentals
3D Design Fundamentals
 
STEM Demystified
STEM DemystifiedSTEM Demystified
STEM Demystified
 
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBandLearn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
Learn to Compose, Record, and Produce Songs and Podcasts Using GarageBand
 
Open Education Resources in Libraries
Open Education Resources in LibrariesOpen Education Resources in Libraries
Open Education Resources in Libraries
 
Learning Kodu: Basic Video Game Design for Kids
Learning Kodu: Basic Video Game Design for KidsLearning Kodu: Basic Video Game Design for Kids
Learning Kodu: Basic Video Game Design for Kids
 
Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It! Learn to Code and Have Fun Doing It!
Learn to Code and Have Fun Doing It!
 
How to Think in the Information Age: Finding Facts in a Post-Truth World
How to Think in the Information Age: Finding Facts in a Post-Truth WorldHow to Think in the Information Age: Finding Facts in a Post-Truth World
How to Think in the Information Age: Finding Facts in a Post-Truth World
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 

Introducing Cascading Style Sheets

  • 1.
  • 3. Virtual Petting Zoo/Discussion Want to hangout? gplus.to/chadmairn anymeeting.com/chadmairn
  • 4. How would you describe this?
  • 5. Agenda • Learn what CSS does and appreciate its importance in Web design. • Recognize and use general CSS grammar (e.g., syntax, semantics, vocabulary) • Understand how to link a CSS file to an HTML document. • Create a Web designers toolbox. • Design a basic webpage using CSS.
  • 6. Draw four lines the same length that touch, two horizontal and two vertical. We need to tell computers exactly what we mean! Source: http://goo.gl/N0gvb
  • 7. Text inside … Border: 5px solid red; Background-color: pink; Padding: 25px; Font: 8px/2 arial;
  • 8. HTML = Content; defines tags etc. CSS = Presentation; tells browser how tags should appear. CSS defines how to display HTML tags. Styles are normally saved in external .css files. External style sheets enable you to change the appearance and layout of all the pages in a Web site, just by editing one single file! Source: http://www.w3schools.com
  • 9. Define widths, heights, colors, marg ins, padding, borders, backgr ounds, and type styles with CSS
  • 11. /*This is a comment*/ p { text-align:center; /*This is another comment*/ color:black; font-family:arial; } CSS Comments
  • 14. ColorZilla and other tools …
  • 15. Adding CSS code to HTML pages 1. External Style Sheet <head> <link rel="stylesheet" type="text/css" href="mystyle.css"> </head> 2. Internal Style Sheet <head> <style> hr {color:sienna;} p {margin-left:20px;} body {background-image:url("images/back40.gif");} </style> </head> 3. Inline Styles <p style="color:sienna;margin-left:20px">This is a paragraph.</p> Note: an inline style will override a style defined inside the <head> tag or in an external style sheet. If the link to the external style sheet is placed after the internal style sheet in HTML <head>, then the external style sheet will override the internal style sheet! Source: http://goo.gl/RgDFa
  • 17. live demonstration ~ Firebug ~ CSS Generating tools ~ CSS Examples
  • 18. 1. If you don't have an FTP application, then I recommend that you download and install the following: http://filezilla-project.org/download.php 2. Upload files to your directory (e.g., email address username). 3. When you begin to work with the FTP client, you will need to enter the following credentials: •Host: via email •Username: via email •Password: via email A quick screencast video demonstrating how to login using the FileZilla FTP Client can be found at http://www.youtube.com/watch?v=9VaM_wv0aQ4. 4. You will need either a text editor (TextEdit on mac or Notepad on PC) or a tool like Dreamweaver. If you have problems, please contact Chad Mairn at (727) 537-6405 or at chadmairn@gmail.com. Uploading Files
  • 20. To test you work visit … http://marcomponline.com/chadtest/Class/ email username
  • 21. Homework … • Create a basic HTML index page (index.html) and include an external style sheet as well as some inline styles. Experiment with various properties and values. • Find an interesting site that uses CSS and modify it for your needs. {Note: try a search for “CSS exercises” and use whatever interests you. http://www.w3schools.com/css/css_examples.asp and http://www.codecademy.com/tracks/htmlcss are great resources! Don’t forget Firebug!} • Test and validate your HTML file at http://validator.w3.org/ • Test and validate your CSS file at http://jigsaw.w3.org/css-validator/ • Please take good notes because I’d like to spend some time next week discussing any issues you may have had using CSS.
  • 22. Next Week … • Share with the group good/bad experiences (e.g., what worked, what didn’t etc.) • Other coding examples • Discuss the future of CSS3/Responsive Web Design • Questions and answers …
  • 23. How did it go?
  • 25. Styling an e-book with Calibre RGB and Hex color values: http://cloford.com/resources/colours/500col.htm
  • 26. CSS pseudo-classes • used to add special effects to some selectors. Some examples: :link - add special style to an unvisited link. :visited - add special style to a visited link. :hover - add special style to an element when you mouse over it.
  • 27. CSS3 • CSS3 is the latest standard for CSS. • CSS3 is backwards compatible; browsers will support CSS2. • Some of the most important CSS3 modules are: – Selectors [HTML (e.g., h2); Class (e.g., .hilight); – Box Model – Backgrounds and Borders – Text Effects – 2D/3D Transformations – Animations – Multiple Column Layout – User Interface Source: http://goo.gl/eMQEC • Try http://css3generator.com/ and http://css3please.com/
  • 28. Code Result Adding a box-shadow to a div element
  • 29. Responsive Web Design • adapts to the webpage’s layout by using fluid, proportion-based grids, flexible images, and CSS3 media queries. • Three concepts: • Media queries and media query listeners • A flexible grid-based layout that uses relative sizing • Flexible images and media, through dynamic resizing or CSS Source: http://goo.gl/UQ94d Caveat: I am just learning RWD!
  • 30. Media queries and media query listeners • CSS3 Media queries enable you to style a page based on properties of the media where the page is being displayed. For example: @media screen and (max-width:400px) { div {border:none;} } • The above code limits the scope to viewports (i.e., virtual window; screen display) which are 400px or less in width. • Media Query Listeners enable you to execute a script in response to a change in a media query. • An example: http://goo.gl/G4fGb Source: http://goo.gl/G4fGb
  • 31. A flexible grid-based layout using relative sizing • ‘non-responsive’ websites have a set width/ fixed value (e.g., 900px) • set a relative value as the width then the screen size is mostly irrelevant. For example: #content{width: 90%;} This content area would respond to the screen size. Source: http://goo.gl/Sa5nG
  • 32. Flexible images and media, through dynamic resizing or CSS • Images are usually set a width and height using absolute measurements like ‘px’. This is not flexible. • Modern browsers are good at maintaining proportions so the image will resize well as the layout resizes. For example: img, embed, object, video { max-width: 100% } Source: http://goo.gl/VN77O
  • 34. Mobile view – Galaxy S3 (Android)