SlideShare a Scribd company logo
INTRO	
  TO	
  CSS	
  
IAT100	
  Spring	
  2010	
  
	
  
Diliara	
  Nasirova	
  
1	
  
OUTLINE	
  
¢  Covered	
  in	
  this	
  lesson:	
  
—  Overview	
  
¢  What	
  is	
  CSS?	
  
¢  Why	
  to	
  use	
  CSS?	
  
—  Structure	
  
¢  CSS	
  Syntax	
  Introduction	
  
¢  Three	
  places	
  CSS	
  can	
  be	
  de=ined	
  
¢  CSS	
  Syntax	
  Speci=ics	
  
¢  Cascading	
  Inheritance	
  
—  Applied	
  
¢  CSS	
  Hands-­‐on	
  
	
  
2	
  
WHAT	
  IS	
  CSS?	
  
¢  Cascading	
  Style	
  Sheets	
  (CSS)	
  de=ines	
  the	
  way	
  website	
  
content	
  is	
  presented.	
  	
  
Visit http://www.csszengarden.com
3	
  
WHERE	
  THE	
  DEFINITION	
  “CASCADING”	
  COMES	
  
FROM?	
  
4	
  
WHERE	
  THE	
  DEFINITION	
  “CASCADING”	
  COMES	
  
FROM?	
  
	
  
*detailed	
  info	
  later	
  
5	
  
WHERE	
  THE	
  DEFINITION	
  “CASCADING”	
  COMES	
  
FROM?	
  
*detailed	
  info	
  later	
  
6	
  
WHY	
  CSS?	
  
¢  Separate	
  Content	
  from	
  Form	
  
<font	
  size=“14px”>	
  
My	
  First	
  Header	
  
</font>	
  
<font	
  size=“12px”	
  color=“red”	
  face=“Verdana”>	
  
My	
  information	
  1	
  goes	
  here.	
  
</font>	
  
<font	
  size=“14px”>	
  
My	
  Second	
  Header	
  
</font>	
  
<font	
  size=“12px”	
  color=“red”	
  face=“Verdana”>	
  
Different	
  information	
  goes	
  here.	
  
</font>	
  
The	
  old	
  way:	
  
7	
  
WHY	
  CSS?	
  CONTINUED.	
  
¢  Separate	
  Content	
  from	
  Form	
  
—  Content	
  
	
  
	
  
	
  
—  Form	
  or	
  Style	
  
<p	
  class=“header”>My	
  First	
  Header</p>	
  
<p	
  class=“info”>My	
  Information	
  1	
  goes	
  here</p>	
  
<p	
  class=“header”>My	
  Second	
  Header</p>	
  
<p	
  class=“info”>Different	
  	
  Information	
  goes	
  here</p>	
  
	
  	
  
(Speci=ic	
  markup	
  properties	
  like	
  Class	
  will	
  be	
  discussed	
  later).	
  
.header	
  {	
  font-­‐size:14px;}	
  
.info	
  { 	
  font-­‐family:	
  verdana;	
  
	
  font-­‐color:	
  blue;	
  
	
  font-­‐size:	
  12px;	
  	
  }	
   8	
  
WHAT	
  DOES	
  THIS	
  SEPARATION	
  GET	
  US?	
  
9	
  
WHAT	
  DOES	
  THIS	
  SEPARATION	
  GET	
  US?	
  
10	
  
WHAT	
  DOES	
  THIS	
  SEPARATION	
  GET	
  US?	
  
11	
  
THREE	
  CSS	
  DEFINITION	
  LOCATIONS	
  
¢  Inline:	
  	
  the	
  “style”	
  attribute	
  
	
  	
  
¢  Internal:	
  the	
  <style>	
  markup	
  tag	
  
	
  
	
  
¢  External:	
  the	
  .css	
  stylesheet	
  =ile	
  
<p>	
  Content	
  </p>	
  
<p	
  style=“font-­‐color:red;	
  font-­‐size:10px;”>	
  Content	
  </p>	
  
<html>	
  <head>	
  
	
  	
  	
  <style>	
  
	
  	
  	
  	
  	
  	
  	
  p	
  { 	
  background-­‐color:	
  Red;	
  
	
  font-­‐family:	
  serif;	
  
	
  font-­‐color:	
  White;	
  }	
  
	
  	
  	
  </style>	
  
</head>	
  <body><p>Content</p></body>	
  </html>	
  
<link	
  rel="stylesheet"	
  type="text/css"	
  href=“mystylesheet.css"	
  />	
  
12	
  
CASCADING	
  
13	
  
CSS	
  SYNTAX	
  
¢  3	
  Elements	
  to	
  a	
  CSS	
  Statement	
  
—  Selector	
  
¢  What	
  HTML	
  sections	
  does	
  it	
  affect?	
  
—  Property	
  
¢  What	
  attribute	
  of	
  that	
  HTML	
  section	
  will	
  be	
  affected?	
  
—  Value	
  
¢  What	
  change	
  will	
  be	
  made	
  to	
  that	
  attribute?	
  
14	
  
CSS	
  SYNTAX	
  
¢  Applying	
  a	
  style	
  to	
  Multiple	
  selectors	
  -­‐	
  separate	
  the	
  
selectors	
  with	
  a	
  comma	
  (,)	
  
	
   	
  	
  
¢  Applying	
  Multiple	
  properties	
  -­‐	
  split	
  each	
  declaration	
  
with	
  a	
  semi-­‐colon	
  (;)	
  	
  
	
   	
  	
  
h1	
  {	
  color:red;	
  font-­‐family:calibri}
h1,	
  h2,	
  h3,	
  h4,	
  h5,	
  h6	
  {	
  color:	
  red	
  }	
  
15	
  
CSS	
  SYNTAX:	
  SELECTORS	
  
¢  Think	
  of	
  …	
  
—  Web	
  Page	
  as	
  a	
  university	
  
—  Selectors	
  can	
  be	
  tags,	
  classes,	
  IDs.	
  Then:	
  
¢  Tags	
  as	
  students	
  
¢  Class	
  as	
  student’s	
  major	
  
¢  ID	
  as	
  student’s	
  ID	
  number	
  	
  
16	
  
CSS	
  SYNTAX:	
  SELECTORS	
  
¢  Tag	
  Selector	
  
¢  Class	
  Selector–	
  precede	
  the	
  class	
  with	
  a	
  dot(.)	
  
¢  ID	
  selector	
  precedes	
  with	
  a	
  "#"	
  symbol	
  
CSS: 	
  .myinfo	
  {	
  font-­‐size:	
  10px;	
  
	
  font-­‐color:	
  White;	
  }	
  
	
  
HTML:	
   	
  <p	
  class=“myinfo” >	
  Content</p>	
  
	
  <div	
  class=“myinfo”>	
  Other	
  content</div>	
  
CSS:	
   	
  #container{	
  font-­‐size:	
  10px;	
  
	
  	
  	
  	
  	
  	
  	
  font-­‐color:	
  White;	
  }	
  
HTML:	
  	
  	
  	
  	
  <div	
  id=“container”>	
  This	
  is	
  one	
  section	
  </div>	
  
CSS:	
   	
  p	
  {font-­‐size:	
  10px;}	
  
HTML: 	
  <p>Content</p>	
  
17	
  
EXTRA	
  HTML	
  TAGS:	
  DIVISION	
  AND	
  SPAN	
  
¢  Extra	
  Tags:	
  Div	
  and	
  Span	
  de=ine	
  sections	
  in	
  a	
  HTML	
  =ile	
  
¢  Div	
  tag	
  is	
  a	
  style	
  element	
  for	
  multiple	
  lines	
  
¢  Span	
  tag	
  is	
  a	
  style	
  element	
  for	
  one	
  line	
  (inline).	
  
¢  You	
  can	
  apply	
  CSS	
  to	
  Div	
  through	
  ID/Class	
  Selector;	
  	
  
<div	
  id	
  =	
  “container”>	
  	
  
	
  	
  	
  	
  <h1>	
  Content	
  goes	
  here	
  </h1>	
  
	
  	
  	
  	
  <p>	
  Content	
  goes	
  here	
  </p>	
  	
  
</div>	
  
<p>	
  Content	
  <span	
  class=“myinfo”>	
  goes	
  here	
  <span>	
  </p>	
  	
  
18	
  
CASCADING	
  INHERITANCE	
  
19	
  
CSS	
  APPLIED	
  
¢  Hands-­‐on	
  CSS	
  Tutorial	
  
¢  Techbyte:	
  http://www.sfu.ca/~tutor/cgi-­‐bin/
techbytes/Dreamweaver/dw2.html	
  
20	
  
PRESENTATION	
  NOTES	
  
¢  Page	
  3:	
  
—  Originally	
  HTML	
  was	
  used	
  to	
  change	
  the	
  appearance	
  of	
  websites,	
  so	
  that	
  HTML	
  
documents	
  eventually	
  turned	
  into	
  a	
  mixture	
  of	
  content	
  and	
  presentaRon.	
  This	
  
problem	
  was	
  solved	
  by	
  W3C	
  (World	
  Wide	
  Web	
  ConsorRum)	
  that	
  created	
  CSS,	
  
level	
  1	
  in	
  1996.	
  It	
  was	
  quickly	
  adopted	
  by	
  all	
  main	
  web	
  browsers.	
  In	
  1998	
  W3C	
  
developed	
  a	
  more	
  sophisRcated	
  and	
  accurate	
  CSS2	
  followed	
  by	
  a	
  minor	
  CSS2.1	
  
update	
  and	
  CSS3	
  is	
  currently	
  under	
  development.	
  CSS	
  is	
  usually	
  stored	
  in	
  
separate	
  .css	
  style	
  sheets	
  which	
  can	
  be	
  re-­‐used	
  for	
  all	
  your	
  web	
  pages.	
  	
  
—  Cascading	
  Style	
  Sheets	
  (CSS)	
  is	
  a	
  language	
  that	
  works	
  with	
  HTML	
  documents	
  for	
  
adding	
  visual	
  style	
  to	
  web	
  sites,	
  in	
  other	
  words	
  for	
  defining	
  the	
  way	
  content	
  is	
  
presented.	
  It	
  deals	
  with	
  colors,	
  fonts,	
  background	
  images,	
  posiRons,	
  width,	
  
height,	
  visibility	
  and	
  many	
  other	
  things.	
  
¢  Page	
  7:	
  
—  Content	
  is	
  the	
  text	
  and	
  images,	
  marked	
  up	
  to	
  define	
  regions	
  of	
  specific	
  types	
  
—  Form	
  defines	
  the	
  “style”	
  for	
  the	
  content	
  	
  
21	
  
PRESENTATION	
  NOTES	
  
¢  Page	
  9:	
  
—  Separate	
  Content	
  from	
  Form	
  
¢  Specify	
  the	
  style	
  once	
  for	
  every	
  instance	
  of	
  that	
  class.	
  
¢  Example:	
  	
  Specify	
  the	
  font	
  once	
  for	
  all	
  text	
  on	
  the	
  HTML	
  page	
  that	
  you	
  
have	
  idenRfied	
  as	
  a	
  “header”.	
  
¢  The	
  style	
  sheet	
  can	
  be	
  a	
  separate	
  file	
  which	
  all	
  HTML	
  pages	
  on	
  your	
  enRre	
  
site	
  can	
  link	
  to.	
  
¢  Only	
  have	
  to	
  specify	
  the	
  style	
  once	
  for	
  your	
  ENTIRE	
  SITE	
  
¢  Can	
  change	
  the	
  style	
  for	
  your	
  enRre	
  site	
  by	
  ediRng	
  only	
  ONE	
  FILE.	
  
¢  Page	
  12:	
  
—  Note,	
  the	
  selector	
  for	
  inline	
  CSS	
  is	
  the	
  tag	
  which	
  contains	
  the	
  style	
  aaribute.	
  	
  
22	
  
RESOURCES:	
  
¢  Notes:	
  	
  
www.tagbytag.org/tutorials/css-­‐beginner/what-­‐is-­‐css	
  
	
  
¢  Pictures:	
  
www.wise-­‐women.org/tutorials/csstut/	
  
	
  
	
  
23	
  

More Related Content

What's hot

Css ms megha
Css ms meghaCss ms megha
Css ms megha
Megha Gupta
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introductionapnwebdev
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
CloudTech 
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to csseShikshak
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
Doris Chen
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
Achmad Solichin
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheetstutorialsruby
 
Css3
Css3Css3
CSS Basics
CSS BasicsCSS Basics
CSS Basics
WordPress Memphis
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
Nitin Bhide
 
The Dark Arts of CSS
The Dark Arts of CSSThe Dark Arts of CSS
The Dark Arts of CSS
SiddharthBorderwala
 
Css for Development
Css for DevelopmentCss for Development
Css for Developmenttsengsite
 
Cascading style sheet (css)]
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]9574395990
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
Russ Weakley
 

What's hot (18)

Css ms megha
Css ms meghaCss ms megha
Css ms megha
 
css-tutorial
css-tutorialcss-tutorial
css-tutorial
 
1 03 - CSS Introduction
1 03 - CSS Introduction1 03 - CSS Introduction
1 03 - CSS Introduction
 
CSS introduction
CSS introductionCSS introduction
CSS introduction
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Introduction to CSS3
Introduction to CSS3Introduction to CSS3
Introduction to CSS3
 
Fundamental CSS3
Fundamental CSS3Fundamental CSS3
Fundamental CSS3
 
Css
CssCss
Css
 
cascadingstylesheets
cascadingstylesheetscascadingstylesheets
cascadingstylesheets
 
Css3
Css3Css3
Css3
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
The Dark Arts of CSS
The Dark Arts of CSSThe Dark Arts of CSS
The Dark Arts of CSS
 
Css for Development
Css for DevelopmentCss for Development
Css for Development
 
David Weliver
David WeliverDavid Weliver
David Weliver
 
Cascading style sheet (css)]
Cascading style sheet (css)]Cascading style sheet (css)]
Cascading style sheet (css)]
 
Full
FullFull
Full
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 

Viewers also liked

Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
Nicole Ryan
 
Css = cascading style sheets
Css = cascading style sheetsCss = cascading style sheets
Css = cascading style sheets
marteisabella
 
3.2 introduction to css
3.2 introduction to css3.2 introduction to css
3.2 introduction to cssBulldogs83
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
Evolution Network
 
CSS: An Introduction
CSS: An IntroductionCSS: An Introduction
CSS: An Introduction
Chris Traganos
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
Swati Sharma
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
Mario Hernandez
 
Floating
FloatingFloating
Floating
Danielle Larson
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
Hatem Mahmoud
 
1 css introduction
1 css introduction1 css introduction
1 css introduction
RaynaITSTEP
 
Css
CssCss
Css floats
Css floatsCss floats
Css floats
Webtech Learning
 
CSS Layouting #4 : Float
CSS Layouting #4 : FloatCSS Layouting #4 : Float
CSS Layouting #4 : Float
Sandhika Galih
 
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
 
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
 

Viewers also liked (20)

Introduction css
Introduction cssIntroduction css
Introduction css
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Css = cascading style sheets
Css = cascading style sheetsCss = cascading style sheets
Css = cascading style sheets
 
Flyover Margate Qld
Flyover Margate QldFlyover Margate Qld
Flyover Margate Qld
 
3.2 introduction to css
3.2 introduction to css3.2 introduction to css
3.2 introduction to css
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
Css
CssCss
Css
 
Php
PhpPhp
Php
 
CSS: An Introduction
CSS: An IntroductionCSS: An Introduction
CSS: An Introduction
 
CSS Introduction
CSS IntroductionCSS Introduction
CSS Introduction
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Floating
FloatingFloating
Floating
 
Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01Cascading Style Sheets - Part 01
Cascading Style Sheets - Part 01
 
Css positioning
Css positioningCss positioning
Css positioning
 
1 css introduction
1 css introduction1 css introduction
1 css introduction
 
Css
CssCss
Css
 
Css floats
Css floatsCss floats
Css floats
 
CSS Layouting #4 : Float
CSS Layouting #4 : FloatCSS Layouting #4 : Float
CSS Layouting #4 : Float
 
Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)Introduction to Cascading Style Sheets (CSS)
Introduction to Cascading Style Sheets (CSS)
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 

Similar to CSS Introduction

DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
JohnpaulStem11
 
CSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slidesCSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slides
Aasma13
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
UsamaShakeel22
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
PramenathA
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
JohnSon872476
 
Introduction to basics of css, overview, syntax and so on
Introduction to basics of css, overview, syntax and so onIntroduction to basics of css, overview, syntax and so on
Introduction to basics of css, overview, syntax and so on
mictnawaraj
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
TusharTikia
 
Introduction to CSS in HTML.ppt
Introduction to CSS in HTML.pptIntroduction to CSS in HTML.ppt
Introduction to CSS in HTML.ppt
parveen837153
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
Dr.Lokesh Gagnani
 
How to use CSS3 in WordPress - Sacramento
How to use CSS3 in WordPress - SacramentoHow to use CSS3 in WordPress - Sacramento
How to use CSS3 in WordPress - Sacramento
Suzette Franck
 
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13LIS3353 SP12 Week 13
LIS3353 SP12 Week 13Amanda Case
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
SURYANARAYANBISWAL1
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
nikhilsh66131
 
INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2Jeff Byrnes
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).ppt
kassahungebrie
 
html-css
html-csshtml-css
Rational HATS and CSS
Rational HATS and CSSRational HATS and CSS
Rational HATS and CSS
Strongback Consulting
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layoutCK Yang
 

Similar to CSS Introduction (20)

DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
CSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slidesCSS Cascading Style Sheet Introduction slides
CSS Cascading Style Sheet Introduction slides
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
DW_lesson2.ppt
DW_lesson2.pptDW_lesson2.ppt
DW_lesson2.ppt
 
Introduction to basics of css, overview, syntax and so on
Introduction to basics of css, overview, syntax and so onIntroduction to basics of css, overview, syntax and so on
Introduction to basics of css, overview, syntax and so on
 
Unit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.pptUnit 2-CSS & Bootstrap.ppt
Unit 2-CSS & Bootstrap.ppt
 
Introduction to CSS in HTML.ppt
Introduction to CSS in HTML.pptIntroduction to CSS in HTML.ppt
Introduction to CSS in HTML.ppt
 
Css
CssCss
Css
 
Unit 3 (it workshop).pptx
Unit 3 (it workshop).pptxUnit 3 (it workshop).pptx
Unit 3 (it workshop).pptx
 
How to use CSS3 in WordPress - Sacramento
How to use CSS3 in WordPress - SacramentoHow to use CSS3 in WordPress - Sacramento
How to use CSS3 in WordPress - Sacramento
 
LIS3353 SP12 Week 13
LIS3353 SP12 Week 13LIS3353 SP12 Week 13
LIS3353 SP12 Week 13
 
INTRODUCTIONS OF CSS
INTRODUCTIONS OF CSSINTRODUCTIONS OF CSS
INTRODUCTIONS OF CSS
 
Introduction to css
Introduction to cssIntroduction to css
Introduction to css
 
INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2INFO3775 Chapter 2 Part 2
INFO3775 Chapter 2 Part 2
 
IP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).pptIP - Lecture 6, 7 Chapter-3 (3).ppt
IP - Lecture 6, 7 Chapter-3 (3).ppt
 
html-css
html-csshtml-css
html-css
 
Rational HATS and CSS
Rational HATS and CSSRational HATS and CSS
Rational HATS and CSS
 
Web topic 15 1 basic css layout
Web topic 15 1  basic css layoutWeb topic 15 1  basic css layout
Web topic 15 1 basic css layout
 

Recently uploaded

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
Bhaskar Mitra
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
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
 
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
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
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
 
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
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
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
 
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
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
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
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
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
 
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
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 

Recently uploaded (20)

The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Search and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical FuturesSearch and Society: Reimagining Information Access for Radical Futures
Search and Society: Reimagining Information Access for Radical Futures
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
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
 
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...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
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 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
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
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...
 
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...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
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
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
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
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 

CSS Introduction

  • 1. INTRO  TO  CSS   IAT100  Spring  2010     Diliara  Nasirova   1  
  • 2. OUTLINE   ¢  Covered  in  this  lesson:   —  Overview   ¢  What  is  CSS?   ¢  Why  to  use  CSS?   —  Structure   ¢  CSS  Syntax  Introduction   ¢  Three  places  CSS  can  be  de=ined   ¢  CSS  Syntax  Speci=ics   ¢  Cascading  Inheritance   —  Applied   ¢  CSS  Hands-­‐on     2  
  • 3. WHAT  IS  CSS?   ¢  Cascading  Style  Sheets  (CSS)  de=ines  the  way  website   content  is  presented.     Visit http://www.csszengarden.com 3  
  • 4. WHERE  THE  DEFINITION  “CASCADING”  COMES   FROM?   4  
  • 5. WHERE  THE  DEFINITION  “CASCADING”  COMES   FROM?     *detailed  info  later   5  
  • 6. WHERE  THE  DEFINITION  “CASCADING”  COMES   FROM?   *detailed  info  later   6  
  • 7. WHY  CSS?   ¢  Separate  Content  from  Form   <font  size=“14px”>   My  First  Header   </font>   <font  size=“12px”  color=“red”  face=“Verdana”>   My  information  1  goes  here.   </font>   <font  size=“14px”>   My  Second  Header   </font>   <font  size=“12px”  color=“red”  face=“Verdana”>   Different  information  goes  here.   </font>   The  old  way:   7  
  • 8. WHY  CSS?  CONTINUED.   ¢  Separate  Content  from  Form   —  Content         —  Form  or  Style   <p  class=“header”>My  First  Header</p>   <p  class=“info”>My  Information  1  goes  here</p>   <p  class=“header”>My  Second  Header</p>   <p  class=“info”>Different    Information  goes  here</p>       (Speci=ic  markup  properties  like  Class  will  be  discussed  later).   .header  {  font-­‐size:14px;}   .info  {  font-­‐family:  verdana;    font-­‐color:  blue;    font-­‐size:  12px;    }   8  
  • 9. WHAT  DOES  THIS  SEPARATION  GET  US?   9  
  • 10. WHAT  DOES  THIS  SEPARATION  GET  US?   10  
  • 11. WHAT  DOES  THIS  SEPARATION  GET  US?   11  
  • 12. THREE  CSS  DEFINITION  LOCATIONS   ¢  Inline:    the  “style”  attribute       ¢  Internal:  the  <style>  markup  tag       ¢  External:  the  .css  stylesheet  =ile   <p>  Content  </p>   <p  style=“font-­‐color:red;  font-­‐size:10px;”>  Content  </p>   <html>  <head>        <style>                p  {  background-­‐color:  Red;    font-­‐family:  serif;    font-­‐color:  White;  }        </style>   </head>  <body><p>Content</p></body>  </html>   <link  rel="stylesheet"  type="text/css"  href=“mystylesheet.css"  />   12  
  • 14. CSS  SYNTAX   ¢  3  Elements  to  a  CSS  Statement   —  Selector   ¢  What  HTML  sections  does  it  affect?   —  Property   ¢  What  attribute  of  that  HTML  section  will  be  affected?   —  Value   ¢  What  change  will  be  made  to  that  attribute?   14  
  • 15. CSS  SYNTAX   ¢  Applying  a  style  to  Multiple  selectors  -­‐  separate  the   selectors  with  a  comma  (,)         ¢  Applying  Multiple  properties  -­‐  split  each  declaration   with  a  semi-­‐colon  (;)           h1  {  color:red;  font-­‐family:calibri} h1,  h2,  h3,  h4,  h5,  h6  {  color:  red  }   15  
  • 16. CSS  SYNTAX:  SELECTORS   ¢  Think  of  …   —  Web  Page  as  a  university   —  Selectors  can  be  tags,  classes,  IDs.  Then:   ¢  Tags  as  students   ¢  Class  as  student’s  major   ¢  ID  as  student’s  ID  number     16  
  • 17. CSS  SYNTAX:  SELECTORS   ¢  Tag  Selector   ¢  Class  Selector–  precede  the  class  with  a  dot(.)   ¢  ID  selector  precedes  with  a  "#"  symbol   CSS:  .myinfo  {  font-­‐size:  10px;    font-­‐color:  White;  }     HTML:    <p  class=“myinfo” >  Content</p>    <div  class=“myinfo”>  Other  content</div>   CSS:    #container{  font-­‐size:  10px;                font-­‐color:  White;  }   HTML:          <div  id=“container”>  This  is  one  section  </div>   CSS:    p  {font-­‐size:  10px;}   HTML:  <p>Content</p>   17  
  • 18. EXTRA  HTML  TAGS:  DIVISION  AND  SPAN   ¢  Extra  Tags:  Div  and  Span  de=ine  sections  in  a  HTML  =ile   ¢  Div  tag  is  a  style  element  for  multiple  lines   ¢  Span  tag  is  a  style  element  for  one  line  (inline).   ¢  You  can  apply  CSS  to  Div  through  ID/Class  Selector;     <div  id  =  “container”>            <h1>  Content  goes  here  </h1>          <p>  Content  goes  here  </p>     </div>   <p>  Content  <span  class=“myinfo”>  goes  here  <span>  </p>     18  
  • 20. CSS  APPLIED   ¢  Hands-­‐on  CSS  Tutorial   ¢  Techbyte:  http://www.sfu.ca/~tutor/cgi-­‐bin/ techbytes/Dreamweaver/dw2.html   20  
  • 21. PRESENTATION  NOTES   ¢  Page  3:   —  Originally  HTML  was  used  to  change  the  appearance  of  websites,  so  that  HTML   documents  eventually  turned  into  a  mixture  of  content  and  presentaRon.  This   problem  was  solved  by  W3C  (World  Wide  Web  ConsorRum)  that  created  CSS,   level  1  in  1996.  It  was  quickly  adopted  by  all  main  web  browsers.  In  1998  W3C   developed  a  more  sophisRcated  and  accurate  CSS2  followed  by  a  minor  CSS2.1   update  and  CSS3  is  currently  under  development.  CSS  is  usually  stored  in   separate  .css  style  sheets  which  can  be  re-­‐used  for  all  your  web  pages.     —  Cascading  Style  Sheets  (CSS)  is  a  language  that  works  with  HTML  documents  for   adding  visual  style  to  web  sites,  in  other  words  for  defining  the  way  content  is   presented.  It  deals  with  colors,  fonts,  background  images,  posiRons,  width,   height,  visibility  and  many  other  things.   ¢  Page  7:   —  Content  is  the  text  and  images,  marked  up  to  define  regions  of  specific  types   —  Form  defines  the  “style”  for  the  content     21  
  • 22. PRESENTATION  NOTES   ¢  Page  9:   —  Separate  Content  from  Form   ¢  Specify  the  style  once  for  every  instance  of  that  class.   ¢  Example:    Specify  the  font  once  for  all  text  on  the  HTML  page  that  you   have  idenRfied  as  a  “header”.   ¢  The  style  sheet  can  be  a  separate  file  which  all  HTML  pages  on  your  enRre   site  can  link  to.   ¢  Only  have  to  specify  the  style  once  for  your  ENTIRE  SITE   ¢  Can  change  the  style  for  your  enRre  site  by  ediRng  only  ONE  FILE.   ¢  Page  12:   —  Note,  the  selector  for  inline  CSS  is  the  tag  which  contains  the  style  aaribute.     22  
  • 23. RESOURCES:   ¢  Notes:     www.tagbytag.org/tutorials/css-­‐beginner/what-­‐is-­‐css     ¢  Pictures:   www.wise-­‐women.org/tutorials/csstut/       23