SlideShare a Scribd company logo
Unit 1: Web Fundamentals
Lesson 8: Learning to Use CSS
August 22, 2013
Lesson 8: Learning to Use CSS
2
Introduction
to HTML
Learning to
Use HTML
HTML and
Email
History and
Future of the
Web
HTML and
Forms
Search
Engine
Optimization
Learning to
Use CSS
Introduction
to CSS
Reusing
Code
3 Ways to
Use CSS
Separation of
Concerns
Launching
Your Own
Website
Lesson 1 Lesson 2 Lesson 3 Lesson 4
Lesson 8 Lesson 7 Lesson 6 Lesson 5
Lesson 9 Lesson 10 Lesson 11 Lesson 12
Build understanding Develop skills
Recap from last time (I)
• CSS is just as important as HTML because it allows us to style a
page to make it look pretty
• Changing the CSS of a site can make a big difference!
3
Recap from last time (II)
• It‟s just as easy to edit CSS as it is to revise HTML
• A server actually sends TWO files when you request a webpage –
HTML and CSS
• You need both to see the full version of the website
4
Let’s write our own CSS file (I)
1. Creating our own CSS file is the same process that we looked at in
Lesson 2 for creating an HTML file. If using a PC, open Notepad. If
using a Mac, open TextEdit.
5
MacPC
Let’s write our own CSS file (II)
2. Type the following code (make sure to copy it exactly!)
6
body {
background-color: #FFFFF0;
color: #FF0000;
font-family: copperplate;
text-align: center;
padding-top: 50px;
}
Let’s write our own CSS file (III)
3. Go to „File‟‟Save‟ and save the file as „smelly-cat.css‟.
7
MacPC
Let’s write our own CSS file (IV)
4. Now open your Chrome browser and go to „File‟‟Open File‟.
Locate our CSS file and open it.
8
MacPC
Let’s write our own CSS file (V)
5. That‟s weird…it looks the same as the text we entered. I thought
CSS was supposed to look cool!
9
MacPC
Let’s write our own CSS file (VI)
6. Well, remember that you can‟t style a webpage using CSS if it
doesn‟t have an HTML foundation. So now we need to create an
HTML file to pair with our CSS file. Let‟s open up a new file in
Notepad (PC) or TextEdit (Mac).
10
MacPC
Let’s write our own CSS file (VII)
7. Type the following code (make sure there aren‟t any typos!)
11
<html>
<head>
</head>
<body>
<h1>Smelly Cat</h1>
<h3>By Phoebe Buffay</h3>
<p>
Smelly Cat, Smelly Cat,<br>
What are they feeding you?<br>
Smelly Cat, Smelly Cat,<br>
It's not your fault.<br>
</p>
</body>
</html>
Let’s write our own CSS file (VIII)
8. Go to „File‟„Save‟ and save this file as „smelly-cat.html‟.
12
MacPC
Let’s write our own CSS file (IX)
9. Open up your Chrome browser again. Go to „File‟„Open
File‟, locate „smelly-cat.html‟ and open it.
13
MacPC
Let’s write our own CSS file (X)
10. You can see that the content appears, but it hasn‟t been stylized at
all. This is because our browser doesn‟t know that the HTML file
and CSS files should be linked together. Let‟s link them and see
what happens…
14
MacPC
This address will look different
Let’s write our own CSS file (XI)
11. Going back to „smelly-cat.html‟, add the following line of code
between the <head> tags. It should now look like this:
15
<html>
<head>
<link rel=“stylesheet” type=“text/css” href=“smelly-cat.css”>
</head>
<body>
…
This line tells the browser to look for a
CSS file called “smelly-cat.css”
Let’s write our own CSS file (XII)
12. Save “smelly-cat.html” and open it again in the browser. Notice
anything different?
16
MacPC
CSS lets us style a page how we want (I)
• Let‟s see how just a few lines of CSS code were able to transform
the look of our page
17
CSS lets us style a page how we want (II)
18
body {
background-color: #FFFFF0;
color: #FF0000;
font-family: copperplate;
text-align: center;
padding-top: 50px;
}
1
2
• This sets the background color to „#FFFFF0‟, which is shorthand for
pale yellow
• This sets the font color to „#FF0000‟, which is shorthand for red
• This changes the font style to one named „Copperplate‟
1
2
3
3
4
5
CSS lets us style a page how we want (III)
19
body {
background-color: #FFFFF0;
color: #FF0000;
font-family: copperplate;
text-align: center;
padding-top: 50px;
}
1
2
• This aligns the text horizontally in the center of the page
• This adds padding, or extra space, between the text and the top of
the page
4
5
3
4
5
Be creative and use your imagination!
20
• There are so many possible ways to style a website – you‟re limited
only by your imagination!
Summary (I)
• Creating a CSS file is just as easy as making an HTML file
• CSS always needs to be paired with HTML for the styling to take
effect
21
Summary (II)
• The HTML code must tell the browser where to find the matching
CSS file
• There are infinite possibilities in styling a website!
22
What to do on your own
1. Go to URL to complete the Codecademy course online
2. Do the practice set on the material learned
1. Take the follow-up quiz to test your understanding
23

More Related Content

Similar to Lesson 108 23 aug13-1430-ay

Lesson 112 24 aug13-2300-ay
Lesson 112 24 aug13-2300-ayLesson 112 24 aug13-2300-ay
Lesson 112 24 aug13-2300-ayCodecademy Ren
 
Le wagon workshop - 2h landing page - Andre Ferrer
Le wagon   workshop - 2h landing page - Andre FerrerLe wagon   workshop - 2h landing page - Andre Ferrer
Le wagon workshop - 2h landing page - Andre Ferrer
André Ferrer
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayCodecademy Ren
 
Make your first webpage
Make your first webpageMake your first webpage
Make your first webpage
mrgonzalezpr
 
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
 
Basic Webpage
Basic WebpageBasic Webpage
Basic Webpage
bmike06
 
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
Sandrine Ayral
 
Coder son site web
Coder son site webCoder son site web
Coder son site web
AndryRajohnson
 
Lesson 104 23 aug13-1430-ay
Lesson 104 23 aug13-1430-ayLesson 104 23 aug13-1430-ay
Lesson 104 23 aug13-1430-ayCodecademy Ren
 
PPT N ASP.NET.pptx
PPT N ASP.NET.pptxPPT N ASP.NET.pptx
PPT N ASP.NET.pptx
NareshSoni23
 
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docxITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
christiandean12115
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
Boris Paillard
 
Class 2 handout css exercises (2)
Class 2 handout css exercises (2)Class 2 handout css exercises (2)
Class 2 handout css exercises (2)Erin M. Kidwell
 
Web Development Training Report.docx
Web Development Training Report.docxWeb Development Training Report.docx
Web Development Training Report.docx
CuriosityKlinic
 
Lesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ayLesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ayCodecademy Ren
 
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
YannKlein2
 
Lesson 111 24 aug13-1430-ay
Lesson 111 24 aug13-1430-ayLesson 111 24 aug13-1430-ay
Lesson 111 24 aug13-1430-ayCodecademy Ren
 
Css Basics
Css BasicsCss Basics
Css Basics
Jay Patel
 

Similar to Lesson 108 23 aug13-1430-ay (20)

Lesson 112 24 aug13-2300-ay
Lesson 112 24 aug13-2300-ayLesson 112 24 aug13-2300-ay
Lesson 112 24 aug13-2300-ay
 
Le wagon workshop - 2h landing page - Andre Ferrer
Le wagon   workshop - 2h landing page - Andre FerrerLe wagon   workshop - 2h landing page - Andre Ferrer
Le wagon workshop - 2h landing page - Andre Ferrer
 
Lesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ayLesson 110 24 aug13-1400-ay
Lesson 110 24 aug13-1400-ay
 
Make your first webpage
Make your first webpageMake your first webpage
Make your first webpage
 
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
 
Basic Webpage
Basic WebpageBasic Webpage
Basic Webpage
 
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
 
Coder son site web
Coder son site webCoder son site web
Coder son site web
 
Lesson 104 23 aug13-1430-ay
Lesson 104 23 aug13-1430-ayLesson 104 23 aug13-1430-ay
Lesson 104 23 aug13-1430-ay
 
PPT N ASP.NET.pptx
PPT N ASP.NET.pptxPPT N ASP.NET.pptx
PPT N ASP.NET.pptx
 
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docxITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
ITECH2106-6106 Lab01-HTML CSS Intro and Needs Analysis.pdf.docx
 
Le Wagon - 2h Landing
Le Wagon - 2h LandingLe Wagon - 2h Landing
Le Wagon - 2h Landing
 
Class 2 handout css exercises (2)
Class 2 handout css exercises (2)Class 2 handout css exercises (2)
Class 2 handout css exercises (2)
 
Web Development Training Report.docx
Web Development Training Report.docxWeb Development Training Report.docx
Web Development Training Report.docx
 
Lesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ayLesson 102 23 aug13-1430-ay
Lesson 102 23 aug13-1430-ay
 
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
 
Lesson 111 24 aug13-1430-ay
Lesson 111 24 aug13-1430-ayLesson 111 24 aug13-1430-ay
Lesson 111 24 aug13-1430-ay
 
Asp.net w3schools
Asp.net w3schoolsAsp.net w3schools
Asp.net w3schools
 
Css Basics
Css BasicsCss Basics
Css Basics
 

More from Codecademy Ren

Lesson 304 05 jan14-1500-ay
Lesson 304 05 jan14-1500-ayLesson 304 05 jan14-1500-ay
Lesson 304 05 jan14-1500-ayCodecademy Ren
 
Lesson 303 05 jan14-1500-ay
Lesson 303 05 jan14-1500-ayLesson 303 05 jan14-1500-ay
Lesson 303 05 jan14-1500-ayCodecademy Ren
 
Lesson 301 26 nov13-1500-ay
Lesson 301 26 nov13-1500-ayLesson 301 26 nov13-1500-ay
Lesson 301 26 nov13-1500-ayCodecademy Ren
 
Lesson 302 05 jan14-1500-ay
Lesson 302 05 jan14-1500-ayLesson 302 05 jan14-1500-ay
Lesson 302 05 jan14-1500-ayCodecademy Ren
 
Lesson 207 19 oct13-1500-ay
Lesson 207 19 oct13-1500-ayLesson 207 19 oct13-1500-ay
Lesson 207 19 oct13-1500-ayCodecademy Ren
 
Lesson 206 11 oct13-1500-ay
Lesson 206 11 oct13-1500-ayLesson 206 11 oct13-1500-ay
Lesson 206 11 oct13-1500-ayCodecademy Ren
 
Lesson 205 07 oct13-1500-ay
Lesson 205 07 oct13-1500-ayLesson 205 07 oct13-1500-ay
Lesson 205 07 oct13-1500-ayCodecademy Ren
 
Lesson 204 03 oct13-1500-ay
Lesson 204 03 oct13-1500-ayLesson 204 03 oct13-1500-ay
Lesson 204 03 oct13-1500-ayCodecademy Ren
 
Lesson 203 18 sep13-1500-ay
Lesson 203 18 sep13-1500-ayLesson 203 18 sep13-1500-ay
Lesson 203 18 sep13-1500-ayCodecademy Ren
 
Lesson 202 02 oct13-1800-ay
Lesson 202 02 oct13-1800-ayLesson 202 02 oct13-1800-ay
Lesson 202 02 oct13-1800-ayCodecademy Ren
 
Lesson 106 23 aug13-1430-ay
Lesson 106 23 aug13-1430-ayLesson 106 23 aug13-1430-ay
Lesson 106 23 aug13-1430-ayCodecademy Ren
 
Lesson 105 23 aug13-1430-ay
Lesson 105 23 aug13-1430-ayLesson 105 23 aug13-1430-ay
Lesson 105 23 aug13-1430-ayCodecademy Ren
 
Lesson 101 23 aug13-1430-ay
Lesson 101 23 aug13-1430-ayLesson 101 23 aug13-1430-ay
Lesson 101 23 aug13-1430-ayCodecademy Ren
 
Lesson 102 25 aug13-2200-ay
Lesson 102 25 aug13-2200-ayLesson 102 25 aug13-2200-ay
Lesson 102 25 aug13-2200-ayCodecademy Ren
 
Lesson 103 23 aug13-1430-ay
Lesson 103 23 aug13-1430-ayLesson 103 23 aug13-1430-ay
Lesson 103 23 aug13-1430-ayCodecademy Ren
 

More from Codecademy Ren (15)

Lesson 304 05 jan14-1500-ay
Lesson 304 05 jan14-1500-ayLesson 304 05 jan14-1500-ay
Lesson 304 05 jan14-1500-ay
 
Lesson 303 05 jan14-1500-ay
Lesson 303 05 jan14-1500-ayLesson 303 05 jan14-1500-ay
Lesson 303 05 jan14-1500-ay
 
Lesson 301 26 nov13-1500-ay
Lesson 301 26 nov13-1500-ayLesson 301 26 nov13-1500-ay
Lesson 301 26 nov13-1500-ay
 
Lesson 302 05 jan14-1500-ay
Lesson 302 05 jan14-1500-ayLesson 302 05 jan14-1500-ay
Lesson 302 05 jan14-1500-ay
 
Lesson 207 19 oct13-1500-ay
Lesson 207 19 oct13-1500-ayLesson 207 19 oct13-1500-ay
Lesson 207 19 oct13-1500-ay
 
Lesson 206 11 oct13-1500-ay
Lesson 206 11 oct13-1500-ayLesson 206 11 oct13-1500-ay
Lesson 206 11 oct13-1500-ay
 
Lesson 205 07 oct13-1500-ay
Lesson 205 07 oct13-1500-ayLesson 205 07 oct13-1500-ay
Lesson 205 07 oct13-1500-ay
 
Lesson 204 03 oct13-1500-ay
Lesson 204 03 oct13-1500-ayLesson 204 03 oct13-1500-ay
Lesson 204 03 oct13-1500-ay
 
Lesson 203 18 sep13-1500-ay
Lesson 203 18 sep13-1500-ayLesson 203 18 sep13-1500-ay
Lesson 203 18 sep13-1500-ay
 
Lesson 202 02 oct13-1800-ay
Lesson 202 02 oct13-1800-ayLesson 202 02 oct13-1800-ay
Lesson 202 02 oct13-1800-ay
 
Lesson 106 23 aug13-1430-ay
Lesson 106 23 aug13-1430-ayLesson 106 23 aug13-1430-ay
Lesson 106 23 aug13-1430-ay
 
Lesson 105 23 aug13-1430-ay
Lesson 105 23 aug13-1430-ayLesson 105 23 aug13-1430-ay
Lesson 105 23 aug13-1430-ay
 
Lesson 101 23 aug13-1430-ay
Lesson 101 23 aug13-1430-ayLesson 101 23 aug13-1430-ay
Lesson 101 23 aug13-1430-ay
 
Lesson 102 25 aug13-2200-ay
Lesson 102 25 aug13-2200-ayLesson 102 25 aug13-2200-ay
Lesson 102 25 aug13-2200-ay
 
Lesson 103 23 aug13-1430-ay
Lesson 103 23 aug13-1430-ayLesson 103 23 aug13-1430-ay
Lesson 103 23 aug13-1430-ay
 

Recently uploaded

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
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
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
 
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
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
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
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
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
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
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
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 

Recently uploaded (20)

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
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
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 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
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
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
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
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
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
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
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 

Lesson 108 23 aug13-1430-ay

  • 1. Unit 1: Web Fundamentals Lesson 8: Learning to Use CSS August 22, 2013
  • 2. Lesson 8: Learning to Use CSS 2 Introduction to HTML Learning to Use HTML HTML and Email History and Future of the Web HTML and Forms Search Engine Optimization Learning to Use CSS Introduction to CSS Reusing Code 3 Ways to Use CSS Separation of Concerns Launching Your Own Website Lesson 1 Lesson 2 Lesson 3 Lesson 4 Lesson 8 Lesson 7 Lesson 6 Lesson 5 Lesson 9 Lesson 10 Lesson 11 Lesson 12 Build understanding Develop skills
  • 3. Recap from last time (I) • CSS is just as important as HTML because it allows us to style a page to make it look pretty • Changing the CSS of a site can make a big difference! 3
  • 4. Recap from last time (II) • It‟s just as easy to edit CSS as it is to revise HTML • A server actually sends TWO files when you request a webpage – HTML and CSS • You need both to see the full version of the website 4
  • 5. Let’s write our own CSS file (I) 1. Creating our own CSS file is the same process that we looked at in Lesson 2 for creating an HTML file. If using a PC, open Notepad. If using a Mac, open TextEdit. 5 MacPC
  • 6. Let’s write our own CSS file (II) 2. Type the following code (make sure to copy it exactly!) 6 body { background-color: #FFFFF0; color: #FF0000; font-family: copperplate; text-align: center; padding-top: 50px; }
  • 7. Let’s write our own CSS file (III) 3. Go to „File‟‟Save‟ and save the file as „smelly-cat.css‟. 7 MacPC
  • 8. Let’s write our own CSS file (IV) 4. Now open your Chrome browser and go to „File‟‟Open File‟. Locate our CSS file and open it. 8 MacPC
  • 9. Let’s write our own CSS file (V) 5. That‟s weird…it looks the same as the text we entered. I thought CSS was supposed to look cool! 9 MacPC
  • 10. Let’s write our own CSS file (VI) 6. Well, remember that you can‟t style a webpage using CSS if it doesn‟t have an HTML foundation. So now we need to create an HTML file to pair with our CSS file. Let‟s open up a new file in Notepad (PC) or TextEdit (Mac). 10 MacPC
  • 11. Let’s write our own CSS file (VII) 7. Type the following code (make sure there aren‟t any typos!) 11 <html> <head> </head> <body> <h1>Smelly Cat</h1> <h3>By Phoebe Buffay</h3> <p> Smelly Cat, Smelly Cat,<br> What are they feeding you?<br> Smelly Cat, Smelly Cat,<br> It's not your fault.<br> </p> </body> </html>
  • 12. Let’s write our own CSS file (VIII) 8. Go to „File‟„Save‟ and save this file as „smelly-cat.html‟. 12 MacPC
  • 13. Let’s write our own CSS file (IX) 9. Open up your Chrome browser again. Go to „File‟„Open File‟, locate „smelly-cat.html‟ and open it. 13 MacPC
  • 14. Let’s write our own CSS file (X) 10. You can see that the content appears, but it hasn‟t been stylized at all. This is because our browser doesn‟t know that the HTML file and CSS files should be linked together. Let‟s link them and see what happens… 14 MacPC This address will look different
  • 15. Let’s write our own CSS file (XI) 11. Going back to „smelly-cat.html‟, add the following line of code between the <head> tags. It should now look like this: 15 <html> <head> <link rel=“stylesheet” type=“text/css” href=“smelly-cat.css”> </head> <body> … This line tells the browser to look for a CSS file called “smelly-cat.css”
  • 16. Let’s write our own CSS file (XII) 12. Save “smelly-cat.html” and open it again in the browser. Notice anything different? 16 MacPC
  • 17. CSS lets us style a page how we want (I) • Let‟s see how just a few lines of CSS code were able to transform the look of our page 17
  • 18. CSS lets us style a page how we want (II) 18 body { background-color: #FFFFF0; color: #FF0000; font-family: copperplate; text-align: center; padding-top: 50px; } 1 2 • This sets the background color to „#FFFFF0‟, which is shorthand for pale yellow • This sets the font color to „#FF0000‟, which is shorthand for red • This changes the font style to one named „Copperplate‟ 1 2 3 3 4 5
  • 19. CSS lets us style a page how we want (III) 19 body { background-color: #FFFFF0; color: #FF0000; font-family: copperplate; text-align: center; padding-top: 50px; } 1 2 • This aligns the text horizontally in the center of the page • This adds padding, or extra space, between the text and the top of the page 4 5 3 4 5
  • 20. Be creative and use your imagination! 20 • There are so many possible ways to style a website – you‟re limited only by your imagination!
  • 21. Summary (I) • Creating a CSS file is just as easy as making an HTML file • CSS always needs to be paired with HTML for the styling to take effect 21
  • 22. Summary (II) • The HTML code must tell the browser where to find the matching CSS file • There are infinite possibilities in styling a website! 22
  • 23. What to do on your own 1. Go to URL to complete the Codecademy course online 2. Do the practice set on the material learned 1. Take the follow-up quiz to test your understanding 23