SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Studio 4: CSS

  Prof. Alvarado
MDST 3703/7703
20 September 2012
Business
• Quizzes due Thursday at midnight
  – Will extend if the WordPress server goes
    down again
• 90 mins …
  – But some flexibility
  – Two hours is the hard limit
• Plan to have graded by next week
Responses from Last Studio
• “Should I continue to break the divisions
  down into sentences? What would happen if
  you broke it down into individual words? If I
  were to further break it down, how could
  this be useful for me? What could I do with
  it?”
  – See the Charrette Project
Turning words into elements
Responses
• How can the word “broken,” with the
  quotation marks around it, mean anything?
  Is there somewhere that I can go in and
  signify what each classification means? Will
  my signifying what it means change
  anything about the html document? I feel
  like I am seeing one side of the process. Is
  there another side to it?
  – Classes provide “hooks” that can be used to
    define styles and behaviors
Responses
• In simple recreation exists a form of
  democratization of information
  – Remediation as appropriation
• I am still confused about what SPAN and DIV
  actually do
  – These are just generic structural elements
  – DIVs are blocks, SPANs are in-line
• Where/when do you define what a “chapter-
  name” actually looks like
  – In CSS or JavaScript …
Responses
• Under content is where the actual tags of
  paragraph and quote come into play, which
  also confuses me because I typically think
  of those aspects as belonging under
  structure, since they don’t relate to the
  meaning, or maybe even layout since they
  help format the page.
  – Paragraphs and quotes are structure
  – Content comprises the actual words and
    letters (the “character data”)
Responses
• I feel like I need a crash course in HTML
  before I can handle the fast pace of this class
  – It should feel weird at first!
  – No need to internalize all of HTML
  – We are learning the logic of markup
• I thought we were using HTML on JEdit
  which is supposed to be non-linear and non-
  hierarchical, but we have also been using XML
  which is very hierarchical
  – Yes, non-linear and hierarchical patterns are
    mixed up in real life
The Document Stack

CONTENT (TEXT)   ASCII, Unicode, etc.


 STRUCTURE              XML


STYLE / LAYOUT          CSS
STRUCTURE,
represented by HTML
LAYOUT, as interpreted by
Chrome
LAYOUT, with CSS (as
interpreted by Chrome)
CSS
• Stands for “Cascading Style Sheets”
• Allows you to add styles to HTML
  – and XML in general
  – Browsers know how to apply CSS styles to
    documents
• “Style” includes things like
  –   Font characteristics
  –   Line characteristics
  –   Background colors and images
  –   Position of things on a page
How does it work?
CSS is language that associates
 style directives with document
            elements

A style directive is something like
 “make the font size 12 points”

To do this, CSS needs an efficient
    way to describe document
             elements
The DOM
• The elements in a document marked up in
  HTML are stored in a a tree called the
  DOM
  – Document Object Model
• The browser can do this because HTML
  follows the OHCO model
• CSS uses the DOM to specify elements
In the DOM, every element has an address
that can be expressed as a string
                                e.g. html/body/h1
Think of this as the element‟s ancestry
Let’s look at an example …
<html>
  <head>
   <title>I’m an HTML document</title>
  </head>
  <body>
   <h1>Here is the first header</h1>
   <p>Here is some conent</p>
  </body>
</html>




            Standard HTML Doc
<html>
  <head>
   <title>I’m an HTML document</title>
  </head>
  <body>
   <h1>Here is the first header</h1>
   <p>Here is some content:</p>
   <div>
   Here is some special content that I
  want to make bigger.
   </div>
  </body>
</html>         Standard HTM
<html>
  <head>
   <title>I’m an HTML document</title>
  </head>
  <body>
   <h1>Here is the first header</h1>
   <p>Here is some content:</p>
   <h1>
   Here is some special content that I
  want to make bigger.
   </h1>
  </body>
</html>        What not to do!
<html>
  <head>
   <title>I’m an HTML document</title>
  </head>
  <body>
   <h1>Here is the first header</h1>
   <p>Here is some conent</p>
   <div style=“font-size:14pt;">
   Here is some special content that I
  want to make bigger.
   </div>
  </body>
</html>        Instead, use CSS
<title>I’m an HTML document</title>
 <style type="text/css">
 div {
   font-size:14pt;      Better yet,
   font-weight:bold;
 }
                       put CSS here
 </style>
</head>
<body>
 <h1>Here is the first header</h1>
 <p>Here is some conent</p>
 <div>
 Here is some special content that I
want to make bigger.
 </div>
<title>I’m an HTML document</title>
 <style type="text/css">
 .foo {
   font-size:14pt;
   font-weight:bold;     Or using a
 }                     class attribute
 </style>
</head>
<body>
 <h1>Here is the first header</h1>
 <p>Here is some conent</p>
 <div class=“foo”>
 Here is some special content that I
want to make bigger.
 </div>
<html>
  <head>
   <title>I’m an HTML document</title>
   <link rel=“stylesheet” type=“text/css”
  href=“default.css” />
  </head>
  <body>    Even better: CSS in linked file
   <h1>Here is the first header</h1>
   <p>Here is some conent</p>
   <div>
   Here is some special content that I want
  to make bigger.
   </div>
  </body>
</html>
default.css
.foo {
  font-size:14pt;
  font-weight:bold;
}



 This is what the content of the
 default.css file would look like.
CSS Syntax: Selectors
.foo {
  font-size:14pt;
  font-weight:bold;
}


        The “selector” indicates what
        elements the styles apply to. Can
        address element names, classes,
        and ID. This uses the DOM.
CSS Syntax: Selectors
                      Here the selector
#foo {                finds an element with
  font-size:14pt;     an ID attribute with
                      the value “foo” …
  font-weight:bold;
}

e.g. <div id=“foo”>Hey.</div>
Example selectors
p   Any p element
p.foo Any p element with a class of foo
.foo Any element with a class of foo
#foo The element with an id of foo
CSS Selectors and the DOM
X                           Y is descendant of X
     Elements of type X    X>Y
#X                          Y is child
     Element with ID X     X+Y
.X                          Y follows X
     Elements of Class X   X~Y
*                           Y immediately follows
     Every element
XY
CSS Selectors and Attributes
X[title]                   href ends with
  X has title            X[data-*="foo"]
X[href=“foo”]              Attribute matches
  X has href of „foo‟    X[foo~="bar"]
X[href*=”foo"]             Attribute among
  href contains „foo‟        values
                           e.g. attr=“v1 v2 v3”
X[href^="http"]
  href begins with ...
X[href$=".jpg”]
CSS Selectors and Pseudo Elements
X:link               X:before
  unclicked anchor   X:after
X:visited              Before and after the
  clicked anchor         element
X:hover                Works with the
                         content property
  on mouse hover
                       E.g. content:”foo”;
X:checked
  checked input
CSS Selectors: Double Colon
• X::first-letter
• X::first-line
CSS Syntax: Declarations
.foo {
  font-size:14pt;
  font-weight:bold;
}
          The “declarations” specify
          properties and values to apply to
          the element.

      Format = property-name:
               value;
Example Directives
font-family: Georgia, Garamond, serif;
color: blue;
color: #eeff99;
background-color: gray;
border: 1px solid black;
CSS Box Model
Basic Idea
• A CSS file is just a series of “rules” that
  associated styles with elements
• A CSS rule has two parts
  – A selector to identify elements (tag name,
    class, id)
  – One or more declarations of style
• CSS rules have a simple syntax
  – Selectors followed by curly braces
  – Key/value pairs separated by colons
  – Rules separated by semi-colons
Basic idea
• You can apply any number of rules to a
  document
• Rules may appear in attributes, headers, or
  external files
• Rules are “cascaded”
  – Later ones inherit previous ones
  – Later ones have precedence (can
    overwrite) earlier ones
Exercise
• Let’s try to format out Persuasion
• Go to blog post for today’s studio

Weitere ähnliche Inhalte

Was ist angesagt?

Ifi7174 lesson1
Ifi7174 lesson1Ifi7174 lesson1
Ifi7174 lesson1Sónia
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2Sónia
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSNaga Harish M
 
Concept of CSS unit3
Concept of CSS unit3Concept of CSS unit3
Concept of CSS unit3SURBHI SAROHA
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation Salman Memon
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSToni Kolev
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSdanpaquette
 
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopShay Howe
 
Concept of CSS part 2
Concept of CSS part 2Concept of CSS part 2
Concept of CSS part 2SURBHI SAROHA
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing worldRuss Weakley
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designersSingsys Pte Ltd
 
CSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreCSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreRuss Weakley
 
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 css3Divya Tiwari
 

Was ist angesagt? (20)

Ifi7174 lesson1
Ifi7174 lesson1Ifi7174 lesson1
Ifi7174 lesson1
 
Ifi7174 lesson2
Ifi7174 lesson2Ifi7174 lesson2
Ifi7174 lesson2
 
Introduction to HTML
Introduction to HTMLIntroduction to HTML
Introduction to HTML
 
About Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JSAbout Best friends - HTML, CSS and JS
About Best friends - HTML, CSS and JS
 
Css ppt
Css pptCss ppt
Css ppt
 
Concept of CSS unit3
Concept of CSS unit3Concept of CSS unit3
Concept of CSS unit3
 
Css
CssCss
Css
 
Complete Lecture on Css presentation
Complete Lecture on Css presentation Complete Lecture on Css presentation
Complete Lecture on Css presentation
 
FFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSSFFW Gabrovo PMG - CSS
FFW Gabrovo PMG - CSS
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
 
Concept of CSS part 2
Concept of CSS part 2Concept of CSS part 2
Concept of CSS part 2
 
CSS: a rapidly changing world
CSS: a rapidly changing worldCSS: a rapidly changing world
CSS: a rapidly changing world
 
uptu web technology unit 2 Css
uptu web technology unit 2 Cssuptu web technology unit 2 Css
uptu web technology unit 2 Css
 
Beginners css tutorial for web designers
Beginners css tutorial for web designersBeginners css tutorial for web designers
Beginners css tutorial for web designers
 
Html
HtmlHtml
Html
 
CSS Basics part One
CSS Basics part OneCSS Basics part One
CSS Basics part One
 
CSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and moreCSS - OOCSS, SMACSS and more
CSS - OOCSS, SMACSS and more
 
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
 
CSS
CSSCSS
CSS
 

Andere mochten auch

Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlMdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlRafael Alvarado
 
UVA MDST 3703 Studio 01 2012-08-30
UVA MDST 3703 Studio 01 2012-08-30UVA MDST 3703 Studio 01 2012-08-30
UVA MDST 3703 Studio 01 2012-08-30Rafael Alvarado
 
UVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionUVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionRafael Alvarado
 
Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsMdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsRafael Alvarado
 
MDST 3703 F10 Seminar 14
MDST 3703 F10 Seminar 14MDST 3703 F10 Seminar 14
MDST 3703 F10 Seminar 14Rafael Alvarado
 
Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13Rafael Alvarado
 
Mdst3703 shiva-2012-10-18
Mdst3703 shiva-2012-10-18Mdst3703 shiva-2012-10-18
Mdst3703 shiva-2012-10-18Rafael Alvarado
 
Mdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataMdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataRafael Alvarado
 
MDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationMDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationRafael Alvarado
 
Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012Rafael Alvarado
 
Mdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studioMdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studioRafael Alvarado
 
UVA MDST 3703 The Stack of Scholarship 2012-09-24
UVA MDST 3703 The Stack of Scholarship 2012-09-24UVA MDST 3703 The Stack of Scholarship 2012-09-24
UVA MDST 3703 The Stack of Scholarship 2012-09-24Rafael Alvarado
 
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreMdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreRafael Alvarado
 

Andere mochten auch (18)

Mdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-htmlMdst3703 2013-09-12-semantic-html
Mdst3703 2013-09-12-semantic-html
 
UVA MDST 3703 Studio 01 2012-08-30
UVA MDST 3703 Studio 01 2012-08-30UVA MDST 3703 Studio 01 2012-08-30
UVA MDST 3703 Studio 01 2012-08-30
 
UVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 IntroductionUVA MDST 3703 2013 08-27 Introduction
UVA MDST 3703 2013 08-27 Introduction
 
Mdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collectionsMdst3703 2013-10-08-thematic-research-collections
Mdst3703 2013-10-08-thematic-research-collections
 
MDST 3703 F10 Seminar 14
MDST 3703 F10 Seminar 14MDST 3703 F10 Seminar 14
MDST 3703 F10 Seminar 14
 
Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13Mdst3703 maps-and-timelines-2012-11-13
Mdst3703 maps-and-timelines-2012-11-13
 
Mdst3703 shiva-2012-10-18
Mdst3703 shiva-2012-10-18Mdst3703 shiva-2012-10-18
Mdst3703 shiva-2012-10-18
 
Mdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-dataMdst3705 2013-02-12-finding-data
Mdst3705 2013-02-12-finding-data
 
MDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to VisualizationMDST 3705 2012-03-05 Databases to Visualization
MDST 3705 2012-03-05 Databases to Visualization
 
Hd Overview
Hd OverviewHd Overview
Hd Overview
 
Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012Mdst3703 graph-theory-11-20-2012
Mdst3703 graph-theory-11-20-2012
 
Mdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studioMdst 3559-01-27-data-journalism-studio
Mdst 3559-01-27-data-journalism-studio
 
MDST 3703 F10 Studio 12
MDST 3703 F10 Studio 12MDST 3703 F10 Studio 12
MDST 3703 F10 Studio 12
 
Mdst 3559-02-22-sql1
Mdst 3559-02-22-sql1Mdst 3559-02-22-sql1
Mdst 3559-02-22-sql1
 
UVA MDST 3703 The Stack of Scholarship 2012-09-24
UVA MDST 3703 The Stack of Scholarship 2012-09-24UVA MDST 3703 The Stack of Scholarship 2012-09-24
UVA MDST 3703 The Stack of Scholarship 2012-09-24
 
Mdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genreMdst3705 2013-02-26-db-as-genre
Mdst3705 2013-02-26-db-as-genre
 
MDST 3703 F10 Studio 2
MDST 3703 F10 Studio 2 MDST 3703 F10 Studio 2
MDST 3703 F10 Studio 2
 
Mdst 3559-02-15-php
Mdst 3559-02-15-phpMdst 3559-02-15-php
Mdst 3559-02-15-php
 

Ähnlich wie UVA MDST 3073 CSS 2012-09-20

BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptxMattMarino13
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)christopherfross
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!Ana Cidre
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSTJ Stalcup
 
Code & Design your first website 4/18
Code & Design your first website 4/18Code & Design your first website 4/18
Code & Design your first website 4/18TJ Stalcup
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS PresentationShawn Calvert
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlantaThinkful
 
Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)ghayour abbas
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Thinkful
 
Web app development_html_css_03
Web app development_html_css_03Web app development_html_css_03
Web app development_html_css_03Hassen Poreya
 
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
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sassSean Wolfe
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSSAmit Tyagi
 

Ähnlich wie UVA MDST 3073 CSS 2012-09-20 (20)

CSS-part-1.ppt
CSS-part-1.pptCSS-part-1.ppt
CSS-part-1.ppt
 
BITM3730Week4.pptx
BITM3730Week4.pptxBITM3730Week4.pptx
BITM3730Week4.pptx
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
HTML and CSS crash course!
HTML and CSS crash course!HTML and CSS crash course!
HTML and CSS crash course!
 
Html intro
Html introHtml intro
Html intro
 
Thinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSSThinkful - Frontend Crash Course - Intro to HTML/CSS
Thinkful - Frontend Crash Course - Intro to HTML/CSS
 
Code & Design your first website 4/18
Code & Design your first website 4/18Code & Design your first website 4/18
Code & Design your first website 4/18
 
Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Html css crash course may 11th, atlanta
Html css crash course may 11th, atlantaHtml css crash course may 11th, atlanta
Html css crash course may 11th, atlanta
 
Web Development 4
Web Development 4Web Development 4
Web Development 4
 
Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)Web Development 4 (HTML & CSS)
Web Development 4 (HTML & CSS)
 
Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)Code &amp; design your first website (3:16)
Code &amp; design your first website (3:16)
 
Web app development_html_css_03
Web app development_html_css_03Web app development_html_css_03
Web app development_html_css_03
 
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
 
Intro to html, css & sass
Intro to html, css & sassIntro to html, css & sass
Intro to html, css & sass
 
6867389.ppt
6867389.ppt6867389.ppt
6867389.ppt
 
6867389.ppt
6867389.ppt6867389.ppt
6867389.ppt
 
6867389 (1).ppt
6867389 (1).ppt6867389 (1).ppt
6867389 (1).ppt
 
Introduction to CSS
Introduction to CSSIntroduction to CSS
Introduction to CSS
 
Lecture2
Lecture2Lecture2
Lecture2
 

Mehr von Rafael Alvarado

Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyMdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyRafael Alvarado
 
Mdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextMdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextRafael Alvarado
 
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsMdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsRafael Alvarado
 
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsMdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsRafael Alvarado
 
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Rafael Alvarado
 
Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Rafael Alvarado
 
Mdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldMdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldRafael Alvarado
 
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataMdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataRafael Alvarado
 
Mdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesMdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesRafael Alvarado
 
Mdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisMdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisRafael Alvarado
 
Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Rafael Alvarado
 
Mdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageMdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageRafael Alvarado
 
Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Rafael Alvarado
 
Mdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introductionMdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introductionRafael Alvarado
 
Mdst3703 culturomics-2012-11-01
Mdst3703 culturomics-2012-11-01Mdst3703 culturomics-2012-11-01
Mdst3703 culturomics-2012-11-01Rafael Alvarado
 
Mdst3703 visualization-2012-10-23
Mdst3703 visualization-2012-10-23Mdst3703 visualization-2012-10-23
Mdst3703 visualization-2012-10-23Rafael Alvarado
 
Mdst3703 ontology-overrated-2012-10-16
Mdst3703 ontology-overrated-2012-10-16Mdst3703 ontology-overrated-2012-10-16
Mdst3703 ontology-overrated-2012-10-16Rafael Alvarado
 
Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11Rafael Alvarado
 
UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04Rafael Alvarado
 

Mehr von Rafael Alvarado (20)

Mdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-historyMdst3703 2013-10-01-hypertext-and-history
Mdst3703 2013-10-01-hypertext-and-history
 
Mdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertextMdst3703 2013-09-24-hypertext
Mdst3703 2013-09-24-hypertext
 
Presentation1
Presentation1Presentation1
Presentation1
 
Mdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-modelsMdst3703 2013-09-17-text-models
Mdst3703 2013-09-17-text-models
 
Mdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signalsMdst3703 2013-09-10-textual-signals
Mdst3703 2013-09-10-textual-signals
 
Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2Mdst3703 2013-09-05-studio2
Mdst3703 2013-09-05-studio2
 
Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2Mdst3703 2013-09-03-plato2
Mdst3703 2013-09-03-plato2
 
Mdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-worldMdst3703 2013-08-29-hello-world
Mdst3703 2013-08-29-hello-world
 
Mdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-dataMdst3705 2013-02-19-text-into-data
Mdst3705 2013-02-19-text-into-data
 
Mdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databasesMdst3705 2013-02-05-databases
Mdst3705 2013-02-05-databases
 
Mdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxisMdst3705 2013-01-29-praxis
Mdst3705 2013-01-29-praxis
 
Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3Mdst3705 2013-01-31-php3
Mdst3705 2013-01-31-php3
 
Mdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-languageMdst3705 2012-01-22-code-as-language
Mdst3705 2012-01-22-code-as-language
 
Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2Mdst3705 2013-01-24-php2
Mdst3705 2013-01-24-php2
 
Mdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introductionMdst3705 2012-01-15-introduction
Mdst3705 2012-01-15-introduction
 
Mdst3703 culturomics-2012-11-01
Mdst3703 culturomics-2012-11-01Mdst3703 culturomics-2012-11-01
Mdst3703 culturomics-2012-11-01
 
Mdst3703 visualization-2012-10-23
Mdst3703 visualization-2012-10-23Mdst3703 visualization-2012-10-23
Mdst3703 visualization-2012-10-23
 
Mdst3703 ontology-overrated-2012-10-16
Mdst3703 ontology-overrated-2012-10-16Mdst3703 ontology-overrated-2012-10-16
Mdst3703 ontology-overrated-2012-10-16
 
Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11Mdst3703 projects-2012-10-11
Mdst3703 projects-2012-10-11
 
UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04UVA MDST 3703 JavaScript (ii) 2012-10-04
UVA MDST 3703 JavaScript (ii) 2012-10-04
 

Kürzlich hochgeladen

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 

Kürzlich hochgeladen (20)

Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 

UVA MDST 3073 CSS 2012-09-20

  • 1. Studio 4: CSS Prof. Alvarado MDST 3703/7703 20 September 2012
  • 2. Business • Quizzes due Thursday at midnight – Will extend if the WordPress server goes down again • 90 mins … – But some flexibility – Two hours is the hard limit • Plan to have graded by next week
  • 3. Responses from Last Studio • “Should I continue to break the divisions down into sentences? What would happen if you broke it down into individual words? If I were to further break it down, how could this be useful for me? What could I do with it?” – See the Charrette Project
  • 5. Responses • How can the word “broken,” with the quotation marks around it, mean anything? Is there somewhere that I can go in and signify what each classification means? Will my signifying what it means change anything about the html document? I feel like I am seeing one side of the process. Is there another side to it? – Classes provide “hooks” that can be used to define styles and behaviors
  • 6. Responses • In simple recreation exists a form of democratization of information – Remediation as appropriation • I am still confused about what SPAN and DIV actually do – These are just generic structural elements – DIVs are blocks, SPANs are in-line • Where/when do you define what a “chapter- name” actually looks like – In CSS or JavaScript …
  • 7. Responses • Under content is where the actual tags of paragraph and quote come into play, which also confuses me because I typically think of those aspects as belonging under structure, since they don’t relate to the meaning, or maybe even layout since they help format the page. – Paragraphs and quotes are structure – Content comprises the actual words and letters (the “character data”)
  • 8. Responses • I feel like I need a crash course in HTML before I can handle the fast pace of this class – It should feel weird at first! – No need to internalize all of HTML – We are learning the logic of markup • I thought we were using HTML on JEdit which is supposed to be non-linear and non- hierarchical, but we have also been using XML which is very hierarchical – Yes, non-linear and hierarchical patterns are mixed up in real life
  • 9. The Document Stack CONTENT (TEXT) ASCII, Unicode, etc. STRUCTURE XML STYLE / LAYOUT CSS
  • 12. LAYOUT, with CSS (as interpreted by Chrome)
  • 13. CSS • Stands for “Cascading Style Sheets” • Allows you to add styles to HTML – and XML in general – Browsers know how to apply CSS styles to documents • “Style” includes things like – Font characteristics – Line characteristics – Background colors and images – Position of things on a page
  • 14. How does it work?
  • 15. CSS is language that associates style directives with document elements A style directive is something like “make the font size 12 points” To do this, CSS needs an efficient way to describe document elements
  • 16. The DOM • The elements in a document marked up in HTML are stored in a a tree called the DOM – Document Object Model • The browser can do this because HTML follows the OHCO model • CSS uses the DOM to specify elements
  • 17. In the DOM, every element has an address that can be expressed as a string e.g. html/body/h1 Think of this as the element‟s ancestry
  • 18. Let’s look at an example …
  • 19. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> </body> </html> Standard HTML Doc
  • 20. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some content:</p> <div> Here is some special content that I want to make bigger. </div> </body> </html> Standard HTM
  • 21. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some content:</p> <h1> Here is some special content that I want to make bigger. </h1> </body> </html> What not to do!
  • 22. <html> <head> <title>I’m an HTML document</title> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div style=“font-size:14pt;"> Here is some special content that I want to make bigger. </div> </body> </html> Instead, use CSS
  • 23. <title>I’m an HTML document</title> <style type="text/css"> div { font-size:14pt;  Better yet, font-weight:bold; } put CSS here </style> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div> Here is some special content that I want to make bigger. </div>
  • 24. <title>I’m an HTML document</title> <style type="text/css"> .foo { font-size:14pt; font-weight:bold; Or using a } class attribute </style> </head> <body> <h1>Here is the first header</h1> <p>Here is some conent</p> <div class=“foo”> Here is some special content that I want to make bigger. </div>
  • 25. <html> <head> <title>I’m an HTML document</title> <link rel=“stylesheet” type=“text/css” href=“default.css” /> </head> <body> Even better: CSS in linked file <h1>Here is the first header</h1> <p>Here is some conent</p> <div> Here is some special content that I want to make bigger. </div> </body> </html>
  • 26. default.css .foo { font-size:14pt; font-weight:bold; } This is what the content of the default.css file would look like.
  • 27. CSS Syntax: Selectors .foo { font-size:14pt; font-weight:bold; } The “selector” indicates what elements the styles apply to. Can address element names, classes, and ID. This uses the DOM.
  • 28. CSS Syntax: Selectors Here the selector #foo { finds an element with font-size:14pt; an ID attribute with the value “foo” … font-weight:bold; } e.g. <div id=“foo”>Hey.</div>
  • 29. Example selectors p Any p element p.foo Any p element with a class of foo .foo Any element with a class of foo #foo The element with an id of foo
  • 30. CSS Selectors and the DOM X Y is descendant of X Elements of type X X>Y #X Y is child Element with ID X X+Y .X Y follows X Elements of Class X X~Y * Y immediately follows Every element XY
  • 31. CSS Selectors and Attributes X[title] href ends with X has title X[data-*="foo"] X[href=“foo”] Attribute matches X has href of „foo‟ X[foo~="bar"] X[href*=”foo"] Attribute among href contains „foo‟ values e.g. attr=“v1 v2 v3” X[href^="http"] href begins with ... X[href$=".jpg”]
  • 32. CSS Selectors and Pseudo Elements X:link X:before unclicked anchor X:after X:visited Before and after the clicked anchor element X:hover Works with the content property on mouse hover E.g. content:”foo”; X:checked checked input
  • 33. CSS Selectors: Double Colon • X::first-letter • X::first-line
  • 34. CSS Syntax: Declarations .foo { font-size:14pt; font-weight:bold; } The “declarations” specify properties and values to apply to the element. Format = property-name: value;
  • 35. Example Directives font-family: Georgia, Garamond, serif; color: blue; color: #eeff99; background-color: gray; border: 1px solid black;
  • 37. Basic Idea • A CSS file is just a series of “rules” that associated styles with elements • A CSS rule has two parts – A selector to identify elements (tag name, class, id) – One or more declarations of style • CSS rules have a simple syntax – Selectors followed by curly braces – Key/value pairs separated by colons – Rules separated by semi-colons
  • 38. Basic idea • You can apply any number of rules to a document • Rules may appear in attributes, headers, or external files • Rules are “cascaded” – Later ones inherit previous ones – Later ones have precedence (can overwrite) earlier ones
  • 39. Exercise • Let’s try to format out Persuasion • Go to blog post for today’s studio