SlideShare a Scribd company logo
Web Workshop: CSSWeb Workshop: CSS
Objectives:
- “What is CSS?”
- Structure of CSS
- How to use CSS in your webpage
What is CSS? (1)What is CSS?
CSS stands for “Cascading Style Sheets”
Cascading: refers to the procedure that
determines which style will apply to a
certain section, if you have more than one
style rule.
What is CSS? (2)What is CSS?
CSS stands for “Cascading Style Sheets”
Style: how you want a certain part of your
page to look. You can set things like color,
margins, font, etc for things like tables,
paragraphs, and headings.
What is CSS? (3)What is CSS?
CSS stands for “Cascading Style Sheets”
Sheets: the “sheets” are like templates, or a
set of rules, for determining how the
webpage will look.
What is CSS? (4)What is CSS?
So, CSS (all together) is a styling language –
a set of rules to tell browsers how your
webpage should look.
What is “Style”?What is “Style”
“Style” is a command that you set to tell the
browser how a certain section of your
webpage should look.
You can use style on many HTML “elements”
(like <p> <h1> <table> etc)
How to write style rules (1)How to write style rules
Two parts: (1) selector and (2) declaration.
Selector: the HTML element you want to
add style to.
<p> <h1> <table> etc
Declaration: the statement of style for that
element. Made up of property and value.
How to write style rules (2)How to write style rules
Selector {declaration;}
Declaration = {property: value;}
Property: what aspect you want to change
ex: color, font, margins, etc.
Value: the exact setting for that aspect.
ex: red, italic, 40px, etc.
How to write style rules (2)How to write style rules
selector {property: value;}
Essentially means:
The thing I want to change
{the aspect of that thing I want to change:
what I want it to be;}
How to write style rules (3)How to write style rules
Selector {property: value;}
h1 {color: red;}
Means: Speaking of my heading1, I want the
text color to be red.
How to write style rules (3)How to write style rules
Selector {property: value;}
I want the color of the text in my paragraph to be
yellow.
p {color: yellow;}
This is the text in this paragraph.
How to write style rules (4)How to write style rules
Selector {property: value;}
h1 {color: blue;
background-color: green;}
Means:
Speaking of my heading1, I want the text
color to be blue and the background color to
be green.
How to write style rules (4)How to write style rules
Selector {property: value;}
I want the text color of my link to be red and the
background color to be yellow.
a {color: red;
background-color: yellow;}
This is my link
Three types of styleWhere do I put my style rules?
There are three types of style-rule-places that
we will cover:
- Inlined
- Internal Style Sheet
- External Style Sheet
<html>
<head><title>My Wonderful Example</title>
</head>
<body>
<p>What was I thinking?</p>
</body>
</html>
a) Inlined example-1
Original html
code
a) Inlined example-2
<body>
<p style=“text-align: center; font-
weight: bold; color: yellow;”>What was I
thinking?</p>
</body>
What was I thinking?
<head><title>My Wonderful Example</title>
<style type=“text/css”>
body {
text-align: left;
font-family: trebuchet,
verdana;}
</style>
</head>
b) Internal-1
b) Internal-2
<head><title>My Wonderful Example</title>
<style type=“text/css”>
body
{
text-align: left;
font-family: Trebuchet,
verdana;
}
</style>
</head>
Internal: Statement of style
<style type=“text/css”>
…
</style>
this is a style
sheet (style type)
written (text) in
css (CSS)
language
Internal: Brackets & Declaration
<style type=“text/css”>
body
{
text-align: left;
font-family: trebuchet, verdana;
}
</style>
I want the “align
text” property to be
given the value of
“left”
c) External
<html>
<head><title>My Way</title>
<link rel="stylesheet"
href="http://www2.hawaii.edu/~myway.
css" type="text/css“>
</head>
<body> </body>
</html> Link to a
separate css page
The end of Basic CSS
On to the exercises!

More Related Content

PPT
CSS - Cascading Style Sheet
PPT
PHP - Introduction to PHP CSS
PPT
INFO3775 Chapter 2 Part 2
PDF
Introduction to css
PPSX
Introduction to css
PPTX
Html Styles-CSS
PPTX
Css starting
CSS - Cascading Style Sheet
PHP - Introduction to PHP CSS
INFO3775 Chapter 2 Part 2
Introduction to css
Introduction to css
Html Styles-CSS
Css starting

What's hot (19)

PPT
CSS 101
PDF
Introduction to css
PPTX
Week 12 CSS - Review from last week
PPT
CSS
PPT
Week3 css
PPT
CSS Basics
PPT
Css lecture notes
PPT
Cascading Style Sheet | CSS
PPTX
CSS Basics (Cascading Style Sheet)
PPTX
Complete Lecture on Css presentation
PPTX
Responsive web design with html5 and css3
PPTX
Html & CSS
PPTX
Introduction to web design discussing which languages is used for website des...
PPTX
Cascading Style Sheet
PPTX
Web topic 16 css workflow
CSS 101
Introduction to css
Week 12 CSS - Review from last week
CSS
Week3 css
CSS Basics
Css lecture notes
Cascading Style Sheet | CSS
CSS Basics (Cascading Style Sheet)
Complete Lecture on Css presentation
Responsive web design with html5 and css3
Html & CSS
Introduction to web design discussing which languages is used for website des...
Cascading Style Sheet
Web topic 16 css workflow
Ad

Viewers also liked (20)

PDF
2014 3-14 萩本匠道場特別編勉強会
PDF
CV_Zaghini Fabio
PDF
weather-lamp
PPTX
Annual Reports 2.0
PPTX
12 pas uniknya penabur
PPTX
Digital Citizenship Initiative1
PPTX
Rain org
PDF
Uu38tahun2004 ttg jalan
PPTX
Kuliah Biologi Dasar: KEHATI
PPTX
Terminos de moda 2
POT
Blood pressure
DOCX
Kurikulum 2013 1
PDF
PPT
Wip presentation 072213
PDF
Kumpulan Portofolio tysar budirianto 2015
PDF
PPTX
Bearing capacity of gravity based foundations, rostock 2012, jakob hausgaard ...
PDF
Digitechx s&l tutorial
PPT
Jacques botha cv
PPTX
2014 3-14 萩本匠道場特別編勉強会
CV_Zaghini Fabio
weather-lamp
Annual Reports 2.0
12 pas uniknya penabur
Digital Citizenship Initiative1
Rain org
Uu38tahun2004 ttg jalan
Kuliah Biologi Dasar: KEHATI
Terminos de moda 2
Blood pressure
Kurikulum 2013 1
Wip presentation 072213
Kumpulan Portofolio tysar budirianto 2015
Bearing capacity of gravity based foundations, rostock 2012, jakob hausgaard ...
Digitechx s&l tutorial
Jacques botha cv
Ad

Similar to css (20)

PPTX
Unit 2 Internet and web technology CSS report
PPTX
diffrent style sheets like cascading style sheets.pptx
PPTX
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
PPTX
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
PPTX
Cascading style sheet, CSS Box model, Table in CSS
PDF
Css tutorial
PDF
Css - Tutorial
PPTX
Lecture-6.pptx
PPTX
CASCADING STYLE SHEETS (CSS).pptx
PPTX
v5-introduction to html-css-210321161444.pptx
PPTX
v5-introduction to html-css-210321161444.pptx
PPT
Make Css easy : easy tips for css
PPTX
PPTX
PPTX
Cordova training - Day 2 Introduction to CSS 3
PPTX
session2 cascading style sheet course.pptx
PPTX
session2 css cascade style sheet course.pptx
PPTX
session2_cascading_style_sheet_cssc.pptx
PDF
Unit 3 (it workshop).pptx
Unit 2 Internet and web technology CSS report
diffrent style sheets like cascading style sheets.pptx
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
CSS – CASCADING STYLE SHEET - MY_PPT.pptx
Cascading style sheet, CSS Box model, Table in CSS
Css tutorial
Css - Tutorial
Lecture-6.pptx
CASCADING STYLE SHEETS (CSS).pptx
v5-introduction to html-css-210321161444.pptx
v5-introduction to html-css-210321161444.pptx
Make Css easy : easy tips for css
Cordova training - Day 2 Introduction to CSS 3
session2 cascading style sheet course.pptx
session2 css cascade style sheet course.pptx
session2_cascading_style_sheet_cssc.pptx
Unit 3 (it workshop).pptx

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
cuic standard and advanced reporting.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Programs and apps: productivity, graphics, security and other tools
Advanced methodologies resolving dimensionality complications for autism neur...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Chapter 3 Spatial Domain Image Processing.pdf
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MYSQL Presentation for SQL database connectivity
cuic standard and advanced reporting.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation_ Review paper, used for researhc scholars
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
sap open course for s4hana steps from ECC to s4
Spectral efficient network and resource selection model in 5G networks

css

  • 1. Web Workshop: CSSWeb Workshop: CSS Objectives: - “What is CSS?” - Structure of CSS - How to use CSS in your webpage
  • 2. What is CSS? (1)What is CSS? CSS stands for “Cascading Style Sheets” Cascading: refers to the procedure that determines which style will apply to a certain section, if you have more than one style rule.
  • 3. What is CSS? (2)What is CSS? CSS stands for “Cascading Style Sheets” Style: how you want a certain part of your page to look. You can set things like color, margins, font, etc for things like tables, paragraphs, and headings.
  • 4. What is CSS? (3)What is CSS? CSS stands for “Cascading Style Sheets” Sheets: the “sheets” are like templates, or a set of rules, for determining how the webpage will look.
  • 5. What is CSS? (4)What is CSS? So, CSS (all together) is a styling language – a set of rules to tell browsers how your webpage should look.
  • 6. What is “Style”?What is “Style” “Style” is a command that you set to tell the browser how a certain section of your webpage should look. You can use style on many HTML “elements” (like <p> <h1> <table> etc)
  • 7. How to write style rules (1)How to write style rules Two parts: (1) selector and (2) declaration. Selector: the HTML element you want to add style to. <p> <h1> <table> etc Declaration: the statement of style for that element. Made up of property and value.
  • 8. How to write style rules (2)How to write style rules Selector {declaration;} Declaration = {property: value;} Property: what aspect you want to change ex: color, font, margins, etc. Value: the exact setting for that aspect. ex: red, italic, 40px, etc.
  • 9. How to write style rules (2)How to write style rules selector {property: value;} Essentially means: The thing I want to change {the aspect of that thing I want to change: what I want it to be;}
  • 10. How to write style rules (3)How to write style rules Selector {property: value;} h1 {color: red;} Means: Speaking of my heading1, I want the text color to be red.
  • 11. How to write style rules (3)How to write style rules Selector {property: value;} I want the color of the text in my paragraph to be yellow. p {color: yellow;} This is the text in this paragraph.
  • 12. How to write style rules (4)How to write style rules Selector {property: value;} h1 {color: blue; background-color: green;} Means: Speaking of my heading1, I want the text color to be blue and the background color to be green.
  • 13. How to write style rules (4)How to write style rules Selector {property: value;} I want the text color of my link to be red and the background color to be yellow. a {color: red; background-color: yellow;} This is my link
  • 14. Three types of styleWhere do I put my style rules? There are three types of style-rule-places that we will cover: - Inlined - Internal Style Sheet - External Style Sheet
  • 15. <html> <head><title>My Wonderful Example</title> </head> <body> <p>What was I thinking?</p> </body> </html> a) Inlined example-1 Original html code
  • 16. a) Inlined example-2 <body> <p style=“text-align: center; font- weight: bold; color: yellow;”>What was I thinking?</p> </body> What was I thinking?
  • 17. <head><title>My Wonderful Example</title> <style type=“text/css”> body { text-align: left; font-family: trebuchet, verdana;} </style> </head> b) Internal-1
  • 18. b) Internal-2 <head><title>My Wonderful Example</title> <style type=“text/css”> body { text-align: left; font-family: Trebuchet, verdana; } </style> </head>
  • 19. Internal: Statement of style <style type=“text/css”> … </style> this is a style sheet (style type) written (text) in css (CSS) language
  • 20. Internal: Brackets & Declaration <style type=“text/css”> body { text-align: left; font-family: trebuchet, verdana; } </style> I want the “align text” property to be given the value of “left”
  • 21. c) External <html> <head><title>My Way</title> <link rel="stylesheet" href="http://www2.hawaii.edu/~myway. css" type="text/css“> </head> <body> </body> </html> Link to a separate css page
  • 22. The end of Basic CSS On to the exercises!

Editor's Notes

  • #8: Selector: the thing I want to make styled: a paragraph, a table, a header, etc. Declaration: what I want to do to my paragraph, table, header, etc.
  • #11: This is if you are writing an embedded style rule!
  • #12: This is if you are writing an embedded style rule!
  • #13: This is if you are writing an embedded style rule!
  • #14: This is if you are writing an embedded style rule!
  • #15: We just saw an example of “inlined” style. Are there any Qs?