SlideShare a Scribd company logo
1 of 22
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

What's hot (19)

CSS 101
CSS 101CSS 101
CSS 101
 
Css
CssCss
Css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Week 12 CSS - Review from last week
Week 12 CSS - Review from last weekWeek 12 CSS - Review from last week
Week 12 CSS - Review from last week
 
CSS
CSS CSS
CSS
 
Week3 css
Week3 cssWeek3 css
Week3 css
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Casc Style Sheets Ii
Casc Style Sheets IiCasc Style Sheets Ii
Casc Style Sheets Ii
 
Css lecture notes
Css lecture notesCss lecture notes
Css lecture notes
 
Cascading Style Sheet | CSS
Cascading Style Sheet | CSSCascading Style Sheet | CSS
Cascading Style Sheet | CSS
 
CSS Basics (Cascading Style Sheet)
CSS Basics (Cascading Style Sheet)CSS Basics (Cascading Style Sheet)
CSS Basics (Cascading Style Sheet)
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
Responsive web design with html5 and css3
Responsive web design with html5 and css3Responsive web design with html5 and css3
Responsive web design with html5 and css3
 
Html & CSS
Html & CSSHtml & CSS
Html & CSS
 
Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...Introduction to web design discussing which languages is used for website des...
Introduction to web design discussing which languages is used for website des...
 
Cascading Style Sheet
Cascading Style SheetCascading Style Sheet
Cascading Style Sheet
 
Cascstylesheets
CascstylesheetsCascstylesheets
Cascstylesheets
 
Web topic 16 css workflow
Web topic 16  css workflowWeb topic 16  css workflow
Web topic 16 css workflow
 
Css
CssCss
Css
 

Viewers also liked

Viewers also liked (20)

2014 3-14 萩本匠道場特別編勉強会
2014 3-14 萩本匠道場特別編勉強会2014 3-14 萩本匠道場特別編勉強会
2014 3-14 萩本匠道場特別編勉強会
 
CV_Zaghini Fabio
CV_Zaghini FabioCV_Zaghini Fabio
CV_Zaghini Fabio
 
weather-lamp
weather-lampweather-lamp
weather-lamp
 
Annual Reports 2.0
Annual Reports 2.0Annual Reports 2.0
Annual Reports 2.0
 
12 pas uniknya penabur
12 pas uniknya penabur12 pas uniknya penabur
12 pas uniknya penabur
 
Digital Citizenship Initiative1
Digital Citizenship Initiative1Digital Citizenship Initiative1
Digital Citizenship Initiative1
 
Rain org
Rain orgRain org
Rain org
 
Uu38tahun2004 ttg jalan
Uu38tahun2004 ttg jalanUu38tahun2004 ttg jalan
Uu38tahun2004 ttg jalan
 
Kuliah Biologi Dasar: KEHATI
Kuliah Biologi Dasar: KEHATIKuliah Biologi Dasar: KEHATI
Kuliah Biologi Dasar: KEHATI
 
Terminos de moda 2
Terminos de moda 2Terminos de moda 2
Terminos de moda 2
 
Blood pressure
Blood pressureBlood pressure
Blood pressure
 
Kurikulum 2013 1
Kurikulum 2013 1Kurikulum 2013 1
Kurikulum 2013 1
 
Compu
CompuCompu
Compu
 
Wip presentation 072213
Wip presentation 072213Wip presentation 072213
Wip presentation 072213
 
Kumpulan Portofolio tysar budirianto 2015
Kumpulan Portofolio tysar budirianto 2015Kumpulan Portofolio tysar budirianto 2015
Kumpulan Portofolio tysar budirianto 2015
 
SQL
SQLSQL
SQL
 
Bearing capacity of gravity based foundations, rostock 2012, jakob hausgaard ...
Bearing capacity of gravity based foundations, rostock 2012, jakob hausgaard ...Bearing capacity of gravity based foundations, rostock 2012, jakob hausgaard ...
Bearing capacity of gravity based foundations, rostock 2012, jakob hausgaard ...
 
Digitechx s&l tutorial
Digitechx s&l tutorialDigitechx s&l tutorial
Digitechx s&l tutorial
 
Jacques botha cv
Jacques botha cvJacques botha cv
Jacques botha cv
 
Compu
CompuCompu
Compu
 

Similar to css (20)

Css tutorial
Css tutorialCss tutorial
Css tutorial
 
Css - Tutorial
Css - TutorialCss - Tutorial
Css - Tutorial
 
Lecture-6.pptx
Lecture-6.pptxLecture-6.pptx
Lecture-6.pptx
 
CASCADING STYLE SHEETS (CSS).pptx
CASCADING STYLE SHEETS (CSS).pptxCASCADING STYLE SHEETS (CSS).pptx
CASCADING STYLE SHEETS (CSS).pptx
 
CSS
CSSCSS
CSS
 
Make Css easy : easy tips for css
Make Css easy : easy tips for cssMake Css easy : easy tips for css
Make Css easy : easy tips for css
 
html-css
html-csshtml-css
html-css
 
Week11 Lecture: CSS
Week11 Lecture: CSSWeek11 Lecture: CSS
Week11 Lecture: CSS
 
Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3Cordova training - Day 2 Introduction to CSS 3
Cordova training - Day 2 Introduction to CSS 3
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
Css
CssCss
Css
 
HTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptxHTML to CSS Basics Exer 2.pptx
HTML to CSS Basics Exer 2.pptx
 
CSS
CSSCSS
CSS
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
CSS
CSSCSS
CSS
 
Css
CssCss
Css
 
Css
CssCss
Css
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
CSS-part-1.ppt
CSS-part-1.pptCSS-part-1.ppt
CSS-part-1.ppt
 

Recently uploaded

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 

Recently uploaded (20)

The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 

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

  1. 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.
  2. This is if you are writing an embedded style rule!
  3. This is if you are writing an embedded style rule!
  4. This is if you are writing an embedded style rule!
  5. This is if you are writing an embedded style rule!
  6. We just saw an example of “inlined” style. Are there any Qs?