SlideShare a Scribd company logo
1 of 42
ARTDM 171, Week 5:
      CSS
          Gilbert Guerrero
        gguerrero@dvc.edu
gilbertguerrero.com/blog/artdm-171/
Homework
• Please email me a link
• Example:
 o http://xyz.xtreemhost.com/week4/




                                      2
Letʼs take a quiz!
Tags (continued)
<a></a> - Anchor
•   Link to an external Web site:
    ‣ <a href="http://www.dvc.edu">DVC</a>
•   Link to a Web page on your own site:
    ‣ <a href="bread.html">My Page About Bread</a>
    ‣ <a href="about/history.html">History of Bread</a>
•   Hooks (invisible):
    ‣ <a name="croissants"></a>
•   Link to the hook:
    ‣ <a href="index.html#croissants">Croissants</a>
<img /> - Image

• <img src="images/file.jpg"
  border="0" height="10" width="10" /> 
• Border, Width and Height are
  optional.
<ul>, <ol> — Lists
Unordered Lists (Bulleted)
<ul>
        <li>Eggs</li>
        <li>Milk</li>
        <li>Potatoes</li>
</ul>
Ordered Lists (Numbered)
<ol>
        <li>Eggs</li>
        <li>Milk</li>
        <li>Potatoes</li>
</ol>
&nbsp; — non breaking
        space
<table> – Table tags
• <table></table> – Table. Encloses your table.
  You can set the width (Pixels or Percentage
  %), border, and cellpadding and cellspacing
  as attributes.

• <tr></tr> – Row. Encloses a row in your table.

• <td></td> – Cell. Encloses what's in each cell
  of the table. These also create your columns.
  Make sure you have the same number of cells
  in each row.
Table Example
•<table width="540" border="0" cellpadding="0"
cellspacing="0">
   <tr>
      <td>column 1</td>
      <td>column 2</td>            Let’s try this
      <td>column 3</td>             example.
   </tr>
   <tr>
      <td>Eggs</td>
      <td>Milk</td>
      <td>Potatoes</td>
   </tr>
</table>
Table Example
                              <table>


<tr>   <td> Column 1 </td> <td> Column 2 </td> <td> Column 3 </td>
                                                                     </tr>
<tr>     <td> Eggs </td>     <td> Milk </td>   <td> Potatoes </td>    </tr>


                              </table>
Fonts
• For fonts, colors, and sizes, use CSS. 
• Placed between the <head></head> tags
• <style type="text/css></style> - Style
  tags. Enclose your CSS code in these.
• Page Elements
 ‣CSS uses page elements to specify
   fonts.  You can set a font on any page
   element, body, h1, p, a,...
What about the <font> tag?

• <font> tag is dead!
• No longer the standard in todayʼs
  World Wide Web
• <font> tags embed presentation in
  the structure
• With CSS, our goal will be to
  separate presentation from structure
Cascading Style Sheets
        (CSS)
Cascading Style Sheets

• Code that you add to your Web
  pages
• Separate presentation from structure
CSS Zen Garden
http://www.csszengarden.com
Parts of a Style Sheet
• Style Sheets are made up of CSS Rules
  selector [, selector2, ...]:pseudo-class {
      property: value;
  }
  /* comment */

• Each rule is made up of a Selector and a
  Declaration Block
• Each declaration in the declaration block is
  made up of a Property and a Value
Page Properties...
Dreamweaver fonts + CSS
Basic Stylesheet
<style type="text/css">
<!--
body, td, th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #996600;
}
h1 {
    font-family: Georgia, Times New Roman, Times, serif;  
                                                          
font-size: 16px;
    color: #003366;
}
-->
</style>
CSS Selectors
Tags

• h1 {
      font-family: Georgia, Times New
  Roman, Times, serif;               
  font-size: 16px;
      color: #003366;
  }
• <h1>My Website About Eating
  Food</h1>
IDs – placed as attributes
within tags
•   Must be unique
•   When used in the <div> tag, separates sections of
    the page: header, nav, content, footer
•   #footer {
        font-family: Georgia, Times New Roman, Times,
    serif;   
        font-size: 16px;
        color: #003366;
    }
•   <div id="footer">(cc) 2009. Some rights
    reserved.</div>
class – attributes within tags

• Can be used several times on a Web
  page... Be careful of overuse
• .highlight {
      background-color: #FFCC00;
  }
•  <p class="highlight">Today I had
  coffee and did laundry.</p>
Pseudo-classes
•   Be aware of ordering when using pseudo for rollover
    states
•   a:link {
        color: #FF0000;
    }
•   a:visited {
        color: #00FF00;
    }
•   a:hover {
        color: #0000FF;
    }
•   <a href="index.html">back to home</a>
Firebug for Firefox
https://addons.mozilla.org/en-
    US/firefox/addon/1843
Using Selectors
Grouped Selectors
body, td, th { 
    color: #000000;
}


h1, h2, h3 { 
    color: #FF0000;
}
Selectors on specific
elements
• This will affect only paragraphs that
  have an attribute class="highlight"

  p.highlight { 
      background-color: #FFFFFF; 
  }
Descendents
•   This will affect linked images only
    a img { 
        border: 0; 
    }
•   This will affect links within paragraphs that have an attribute
    class=“hightlight”
    p.highlight a { 
        font-weight: bold; 
    }
•   This will affect links while hovering within a list in the navigation
    container
    #navigation ul li a:hover {
        background-color: #FFFFFF; 
    }
Fonts
Font Sizes
•   Pixels (px)
•   Ems (em)
•   Percentage (%)
•   Points (pt)
•   Picas (pica)
•   Inches (in)
•   Centimeters (cm)
•   Milimeters (mm)
Absolute Font Size: px

• Example:
  font-size: 12px;
• Not proportional to the viewing area. 
  Always the same.
Relative Font Size: em or %

• Example:
  font-size: 1.2em;
  font-size: 120%;
• Proportional to the viewing area.
Relative Font Sizing
Relative font sizing can be difficult to use. Hereʼs one strategy:
•Browser default sizing for fonts is roughly 16pt.  62.5% resets
the default size to roughly 10pt, which makes it easier to do the
math
•1em translates 10pt
•1.2em translates to 12pt
body {
    font-size: 62.5%;
}
p{
    font-size: 1.2em; 
}
Relative Font Sizing

• Nested elements affect each other
• If an element has a font size of 80%
  and is nested within an element that
  also has a font size of 80%, then the
  result is a font size of 64%
• That's 80% of 80%
• This could be a lot smaller than you
  might have wanted.
Embedded, Linked, and
  Inline Stylesheets
Embedded
•   Embedded Style Sheet: are placed within the header,
    within a Web page
<html>
   <head>
   <style type="text/css">
   h1 {
       font-family: Georgia, Times New Roman, serif;
   }
   </style>
   </head>
   <body>
   </body>
   </html>
Linked
• Linked Style Sheet: All CSS rules are saved
  in a .css file
<html>
  <head>
  <link rel="stylesheet" href="css/global.css"
  type="text/css" />
  </head>
  <body> 
  </body>
  </html>
Inline
•   Inline Styles: declarations can be placed
    within a single tag as a style attribute
<html>
  <head>
  </head>
  <body> 
  <p>What color is a cucumber?</p>
  <p style="color:#00FF00;font-weight:bold;">A
  cucumber is green.</p>
  </body>
  </html> 
Group Projects are due
      next week
Homework due Sept 22

• Read chapter “Graphics” in Web
  Style Guide
• Complete Group Projects
• Next week: formatting images for the
  Web
Thank You

More Related Content

What's hot

Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Gheyath M. Othman
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Gheyath M. Othman
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSMario Hernandez
 
Web Design Course: CSS lecture 2
Web Design Course: CSS  lecture 2Web Design Course: CSS  lecture 2
Web Design Course: CSS lecture 2Gheyath M. Othman
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSSdanpaquette
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSSMike Crabb
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Hatem Mahmoud
 
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
 
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopShay Howe
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptMarc Huang
 
3 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 202101053 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 20210105John Picasso
 
Styling with CSS
Styling with CSSStyling with CSS
Styling with CSSMike Crabb
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSSRuss Weakley
 

What's hot (20)

Sass
SassSass
Sass
 
Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1Web Design Course: CSS lecture 1
Web Design Course: CSS lecture 1
 
Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3Web Design Course: CSS lecture 3
Web Design Course: CSS lecture 3
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Intro to HTML + CSS
Intro to HTML + CSSIntro to HTML + CSS
Intro to HTML + CSS
 
Unit 2 (it workshop)
Unit 2 (it workshop)Unit 2 (it workshop)
Unit 2 (it workshop)
 
Web Design Course: CSS lecture 2
Web Design Course: CSS  lecture 2Web Design Course: CSS  lecture 2
Web Design Course: CSS lecture 2
 
Introduction to HTML and CSS
Introduction to HTML and CSSIntroduction to HTML and CSS
Introduction to HTML and CSS
 
Layout with CSS
Layout with CSSLayout with CSS
Layout with CSS
 
Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02Cascading Style Sheets - Part 02
Cascading Style Sheets - Part 02
 
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
 
Modular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS WorkshopModular HTML, CSS, & JS Workshop
Modular HTML, CSS, & JS Workshop
 
Page layout with css
Page layout with cssPage layout with css
Page layout with css
 
Web front end development introduction to html css and javascript
Web front end development introduction to html css and javascriptWeb front end development introduction to html css and javascript
Web front end development introduction to html css and javascript
 
Css
CssCss
Css
 
3 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 202101053 coding101 fewd_lesson3_your_first_website 20210105
3 coding101 fewd_lesson3_your_first_website 20210105
 
Styling with CSS
Styling with CSSStyling with CSS
Styling with CSS
 
Efficient, maintainable CSS
Efficient, maintainable CSSEfficient, maintainable CSS
Efficient, maintainable CSS
 
CSS Reset
CSS ResetCSS Reset
CSS Reset
 

Viewers also liked

Especificidade e importância da pratica docente
Especificidade e importância da pratica docenteEspecificidade e importância da pratica docente
Especificidade e importância da pratica docenteLuzivania Cabral
 
ARTDM 170, Week 12: Flash Text Elements
ARTDM 170, Week 12: Flash Text ElementsARTDM 170, Week 12: Flash Text Elements
ARTDM 170, Week 12: Flash Text ElementsGilbert Guerrero
 
DOME ASSISTÊNCIA FAMILIAR - OPORTUNIDADE NEGOCIO
DOME ASSISTÊNCIA FAMILIAR -  OPORTUNIDADE NEGOCIODOME ASSISTÊNCIA FAMILIAR -  OPORTUNIDADE NEGOCIO
DOME ASSISTÊNCIA FAMILIAR - OPORTUNIDADE NEGOCIOOhms Eletrica
 
Act8 identifica bases_ácidos_monica_uribe
Act8 identifica bases_ácidos_monica_uribeAct8 identifica bases_ácidos_monica_uribe
Act8 identifica bases_ácidos_monica_uribeMonica Lopez
 
Villa adriana by L.D.R.
Villa adriana by L.D.R. Villa adriana by L.D.R.
Villa adriana by L.D.R. mariella
 
L'animatore digitale, questo sconosciuto.
L'animatore digitale, questo sconosciuto.L'animatore digitale, questo sconosciuto.
L'animatore digitale, questo sconosciuto.Lorenza Boninu
 
Job Search Strategies for Fundraising Professionals
Job Search Strategies for Fundraising ProfessionalsJob Search Strategies for Fundraising Professionals
Job Search Strategies for Fundraising ProfessionalsMarina Dawson
 
Creation of Department of Cooperatives or Dep Co
Creation of Department of Cooperatives or Dep CoCreation of Department of Cooperatives or Dep Co
Creation of Department of Cooperatives or Dep Cojo bitonio
 
Conferencia octubre 2015
Conferencia octubre 2015Conferencia octubre 2015
Conferencia octubre 2015evaristogonzal2
 
Drugstore Market Overview Utai Sukviwatsirikul
Drugstore Market Overview Utai SukviwatsirikulDrugstore Market Overview Utai Sukviwatsirikul
Drugstore Market Overview Utai SukviwatsirikulUtai Sukviwatsirikul
 
SquarePegSocietyMeetingPresentation_2016September15
SquarePegSocietyMeetingPresentation_2016September15SquarePegSocietyMeetingPresentation_2016September15
SquarePegSocietyMeetingPresentation_2016September15Nicole Jinn
 
ARTDM 171, Week 15: Search Engine Optimization (SEO)
ARTDM 171, Week 15: Search Engine Optimization (SEO)ARTDM 171, Week 15: Search Engine Optimization (SEO)
ARTDM 171, Week 15: Search Engine Optimization (SEO)Gilbert Guerrero
 
Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...
Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...
Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...Caroline Reis Gonçalves
 
Presentacion ensayo
Presentacion ensayoPresentacion ensayo
Presentacion ensayoCinthyEle
 

Viewers also liked (19)

CV of Sujan
CV of SujanCV of Sujan
CV of Sujan
 
Especificidade e importância da pratica docente
Especificidade e importância da pratica docenteEspecificidade e importância da pratica docente
Especificidade e importância da pratica docente
 
ARTDM 170, Week 12: Flash Text Elements
ARTDM 170, Week 12: Flash Text ElementsARTDM 170, Week 12: Flash Text Elements
ARTDM 170, Week 12: Flash Text Elements
 
DOME ASSISTÊNCIA FAMILIAR - OPORTUNIDADE NEGOCIO
DOME ASSISTÊNCIA FAMILIAR -  OPORTUNIDADE NEGOCIODOME ASSISTÊNCIA FAMILIAR -  OPORTUNIDADE NEGOCIO
DOME ASSISTÊNCIA FAMILIAR - OPORTUNIDADE NEGOCIO
 
Act8 identifica bases_ácidos_monica_uribe
Act8 identifica bases_ácidos_monica_uribeAct8 identifica bases_ácidos_monica_uribe
Act8 identifica bases_ácidos_monica_uribe
 
Villa adriana by L.D.R.
Villa adriana by L.D.R. Villa adriana by L.D.R.
Villa adriana by L.D.R.
 
C.V(1)
C.V(1)C.V(1)
C.V(1)
 
L'animatore digitale, questo sconosciuto.
L'animatore digitale, questo sconosciuto.L'animatore digitale, questo sconosciuto.
L'animatore digitale, questo sconosciuto.
 
Mohamed Aly Othman C.V
Mohamed Aly Othman C.VMohamed Aly Othman C.V
Mohamed Aly Othman C.V
 
Job Search Strategies for Fundraising Professionals
Job Search Strategies for Fundraising ProfessionalsJob Search Strategies for Fundraising Professionals
Job Search Strategies for Fundraising Professionals
 
Creation of Department of Cooperatives or Dep Co
Creation of Department of Cooperatives or Dep CoCreation of Department of Cooperatives or Dep Co
Creation of Department of Cooperatives or Dep Co
 
Conferencia octubre 2015
Conferencia octubre 2015Conferencia octubre 2015
Conferencia octubre 2015
 
Safia Ismail-CV
Safia Ismail-CVSafia Ismail-CV
Safia Ismail-CV
 
Drugstore Market Overview Utai Sukviwatsirikul
Drugstore Market Overview Utai SukviwatsirikulDrugstore Market Overview Utai Sukviwatsirikul
Drugstore Market Overview Utai Sukviwatsirikul
 
SquarePegSocietyMeetingPresentation_2016September15
SquarePegSocietyMeetingPresentation_2016September15SquarePegSocietyMeetingPresentation_2016September15
SquarePegSocietyMeetingPresentation_2016September15
 
ARTDM 171, Week 15: Search Engine Optimization (SEO)
ARTDM 171, Week 15: Search Engine Optimization (SEO)ARTDM 171, Week 15: Search Engine Optimization (SEO)
ARTDM 171, Week 15: Search Engine Optimization (SEO)
 
Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...
Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...
Atendimento pré hospitalar de urgências obstétricas - Treinamento SAMU BH e D...
 
Tablas termodinamica
Tablas termodinamicaTablas termodinamica
Tablas termodinamica
 
Presentacion ensayo
Presentacion ensayoPresentacion ensayo
Presentacion ensayo
 

Similar to ARTDM 171, Week 5: CSS

Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmithaps4
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptxMattMarino13
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptraghavanp4
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptxMattMarino13
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSSNosheen Qamar
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheetssmitha273566
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshMukesh Kumar
 
BITM3730 9-12.pptx
BITM3730 9-12.pptxBITM3730 9-12.pptx
BITM3730 9-12.pptxMattMarino13
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSJussi Pohjolainen
 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)PumoTechnovation
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)Webtech Learning
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSSispkosova
 
Class 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & IdsClass 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & IdsErika Tarte
 

Similar to ARTDM 171, Week 5: CSS (20)

Artdm171 Week5 Css
Artdm171 Week5 CssArtdm171 Week5 Css
Artdm171 Week5 Css
 
CSS
CSSCSS
CSS
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
BITM3730 9-19.pptx
BITM3730 9-19.pptxBITM3730 9-19.pptx
BITM3730 9-19.pptx
 
HTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.pptHTML Web Devlopment presentation css.ppt
HTML Web Devlopment presentation css.ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
css.ppt
css.pptcss.ppt
css.ppt
 
BITM3730 9-20.pptx
BITM3730 9-20.pptxBITM3730 9-20.pptx
BITM3730 9-20.pptx
 
Web Engineering - Introduction to CSS
Web Engineering - Introduction to CSSWeb Engineering - Introduction to CSS
Web Engineering - Introduction to CSS
 
Web
WebWeb
Web
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Cascading Style Sheets By Mukesh
Cascading Style Sheets By MukeshCascading Style Sheets By Mukesh
Cascading Style Sheets By Mukesh
 
BITM3730 9-12.pptx
BITM3730 9-12.pptxBITM3730 9-12.pptx
BITM3730 9-12.pptx
 
Introduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSSIntroduction to XML, XHTML and CSS
Introduction to XML, XHTML and CSS
 
CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)CSS (Cascading Style Sheet)
CSS (Cascading Style Sheet)
 
Css types internal, external and inline (1)
Css types internal, external and inline (1)Css types internal, external and inline (1)
Css types internal, external and inline (1)
 
Html Css
Html CssHtml Css
Html Css
 
Basic HTML/CSS
Basic HTML/CSSBasic HTML/CSS
Basic HTML/CSS
 
Html Styles-CSS
Html Styles-CSSHtml Styles-CSS
Html Styles-CSS
 
Class 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & IdsClass 2: CSS Selectors, Classes & Ids
Class 2: CSS Selectors, Classes & Ids
 

More from Gilbert Guerrero

Designing for Skepticism and Bright Sunlight
Designing for Skepticism and Bright SunlightDesigning for Skepticism and Bright Sunlight
Designing for Skepticism and Bright SunlightGilbert Guerrero
 
ARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QAARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QAGilbert Guerrero
 
Artdm 170 week15 publishing
Artdm 170 week15 publishingArtdm 170 week15 publishing
Artdm 170 week15 publishingGilbert Guerrero
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysGilbert Guerrero
 
ARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to ProcessingARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to ProcessingGilbert Guerrero
 
ARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation SchemesARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation SchemesGilbert Guerrero
 
Artdm170 week12 user_interaction
Artdm170 week12 user_interactionArtdm170 week12 user_interaction
Artdm170 week12 user_interactionGilbert Guerrero
 
Artdm 171 Week12 Templates
Artdm 171 Week12 TemplatesArtdm 171 Week12 Templates
Artdm 171 Week12 TemplatesGilbert Guerrero
 
ARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page CompsARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page CompsGilbert Guerrero
 
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper PrototypesARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper PrototypesGilbert Guerrero
 
ARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User ExperienceARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User ExperienceGilbert Guerrero
 
ARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping CyberspaceARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping CyberspaceGilbert Guerrero
 
ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityGilbert Guerrero
 
Artdm170 week6 scripting_motion
Artdm170 week6 scripting_motionArtdm170 week6 scripting_motion
Artdm170 week6 scripting_motionGilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionGilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionGilbert Guerrero
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionGilbert Guerrero
 

More from Gilbert Guerrero (20)

Designing for Skepticism and Bright Sunlight
Designing for Skepticism and Bright SunlightDesigning for Skepticism and Bright Sunlight
Designing for Skepticism and Bright Sunlight
 
ARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QAARTDM 171, Week 17: Usability Testing and QA
ARTDM 171, Week 17: Usability Testing and QA
 
Artdm 171 week15 seo
Artdm 171 week15 seoArtdm 171 week15 seo
Artdm 171 week15 seo
 
Artdm 170 week15 publishing
Artdm 170 week15 publishingArtdm 170 week15 publishing
Artdm 170 week15 publishing
 
ARTDM 171, Week 14: Forms
ARTDM 171, Week 14: FormsARTDM 171, Week 14: Forms
ARTDM 171, Week 14: Forms
 
ARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + ArraysARTDM 170, Week 13: Text Elements + Arrays
ARTDM 170, Week 13: Text Elements + Arrays
 
ARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to ProcessingARTDM 170, Week 14: Introduction to Processing
ARTDM 170, Week 14: Introduction to Processing
 
ARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation SchemesARTDM 171, Week 13: Navigation Schemes
ARTDM 171, Week 13: Navigation Schemes
 
Artdm170 week12 user_interaction
Artdm170 week12 user_interactionArtdm170 week12 user_interaction
Artdm170 week12 user_interaction
 
Artdm 171 Week12 Templates
Artdm 171 Week12 TemplatesArtdm 171 Week12 Templates
Artdm 171 Week12 Templates
 
ARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page CompsARTDM 171, Week 10: Mood Boards + Page Comps
ARTDM 171, Week 10: Mood Boards + Page Comps
 
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper PrototypesARTDM 170, Week 10: Encapsulation + Paper Prototypes
ARTDM 170, Week 10: Encapsulation + Paper Prototypes
 
ARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User ExperienceARTDM 171, Week 9: User Experience
ARTDM 171, Week 9: User Experience
 
ARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping CyberspaceARTDM 171, Week 7: Remapping Cyberspace
ARTDM 171, Week 7: Remapping Cyberspace
 
ARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting InteractivityARTDM 170, Week 7: Scripting Interactivity
ARTDM 170, Week 7: Scripting Interactivity
 
Artdm170 week6 scripting_motion
Artdm170 week6 scripting_motionArtdm170 week6 scripting_motion
Artdm170 week6 scripting_motion
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
 
Artdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting MotionArtdm170 Week6 Scripting Motion
Artdm170 Week6 Scripting Motion
 
Artdm171 Week6 Images
Artdm171 Week6 ImagesArtdm171 Week6 Images
Artdm171 Week6 Images
 

Recently uploaded

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
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
 
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
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
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
 

Recently uploaded (20)

Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
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...
 
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
 
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
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
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
 

ARTDM 171, Week 5: CSS

  • 1. ARTDM 171, Week 5: CSS Gilbert Guerrero gguerrero@dvc.edu gilbertguerrero.com/blog/artdm-171/
  • 2. Homework • Please email me a link • Example: o http://xyz.xtreemhost.com/week4/ 2
  • 5. <a></a> - Anchor • Link to an external Web site: ‣ <a href="http://www.dvc.edu">DVC</a> • Link to a Web page on your own site: ‣ <a href="bread.html">My Page About Bread</a> ‣ <a href="about/history.html">History of Bread</a> • Hooks (invisible): ‣ <a name="croissants"></a> • Link to the hook: ‣ <a href="index.html#croissants">Croissants</a>
  • 6. <img /> - Image • <img src="images/file.jpg" border="0" height="10" width="10" />  • Border, Width and Height are optional.
  • 7. <ul>, <ol> — Lists Unordered Lists (Bulleted) <ul> <li>Eggs</li> <li>Milk</li> <li>Potatoes</li> </ul> Ordered Lists (Numbered) <ol> <li>Eggs</li> <li>Milk</li> <li>Potatoes</li> </ol>
  • 8. &nbsp; — non breaking space
  • 9. <table> – Table tags • <table></table> – Table. Encloses your table. You can set the width (Pixels or Percentage %), border, and cellpadding and cellspacing as attributes. • <tr></tr> – Row. Encloses a row in your table. • <td></td> – Cell. Encloses what's in each cell of the table. These also create your columns. Make sure you have the same number of cells in each row.
  • 10. Table Example •<table width="540" border="0" cellpadding="0" cellspacing="0"> <tr> <td>column 1</td> <td>column 2</td> Let’s try this <td>column 3</td> example. </tr> <tr> <td>Eggs</td> <td>Milk</td> <td>Potatoes</td> </tr> </table>
  • 11. Table Example <table> <tr> <td> Column 1 </td> <td> Column 2 </td> <td> Column 3 </td> </tr> <tr> <td> Eggs </td> <td> Milk </td> <td> Potatoes </td> </tr> </table>
  • 12. Fonts • For fonts, colors, and sizes, use CSS.  • Placed between the <head></head> tags • <style type="text/css></style> - Style tags. Enclose your CSS code in these. • Page Elements ‣CSS uses page elements to specify fonts.  You can set a font on any page element, body, h1, p, a,...
  • 13. What about the <font> tag? • <font> tag is dead! • No longer the standard in todayʼs World Wide Web • <font> tags embed presentation in the structure • With CSS, our goal will be to separate presentation from structure
  • 15. Cascading Style Sheets • Code that you add to your Web pages • Separate presentation from structure
  • 17. Parts of a Style Sheet • Style Sheets are made up of CSS Rules selector [, selector2, ...]:pseudo-class { property: value; } /* comment */ • Each rule is made up of a Selector and a Declaration Block • Each declaration in the declaration block is made up of a Property and a Value
  • 19. Basic Stylesheet <style type="text/css"> <!-- body, td, th {     font-family: Arial, Helvetica, sans-serif;     font-size: 12px;     color: #996600; } h1 {     font-family: Georgia, Times New Roman, Times, serif;     font-size: 16px;     color: #003366; } --> </style>
  • 21. Tags • h1 {     font-family: Georgia, Times New Roman, Times, serif;                font-size: 16px;     color: #003366; } • <h1>My Website About Eating Food</h1>
  • 22. IDs – placed as attributes within tags • Must be unique • When used in the <div> tag, separates sections of the page: header, nav, content, footer • #footer { font-family: Georgia, Times New Roman, Times, serif;    font-size: 16px;     color: #003366; } • <div id="footer">(cc) 2009. Some rights reserved.</div>
  • 23. class – attributes within tags • Can be used several times on a Web page... Be careful of overuse • .highlight {     background-color: #FFCC00; } •  <p class="highlight">Today I had coffee and did laundry.</p>
  • 24. Pseudo-classes • Be aware of ordering when using pseudo for rollover states • a:link {     color: #FF0000; } • a:visited {     color: #00FF00; } • a:hover {     color: #0000FF; } • <a href="index.html">back to home</a>
  • 27. Grouped Selectors body, td, th {      color: #000000; } h1, h2, h3 {      color: #FF0000; }
  • 28. Selectors on specific elements • This will affect only paragraphs that have an attribute class="highlight" p.highlight {      background-color: #FFFFFF;  }
  • 29. Descendents • This will affect linked images only a img {      border: 0;  } • This will affect links within paragraphs that have an attribute class=“hightlight” p.highlight a {      font-weight: bold;  } • This will affect links while hovering within a list in the navigation container #navigation ul li a:hover {     background-color: #FFFFFF;  }
  • 30. Fonts
  • 31. Font Sizes • Pixels (px) • Ems (em) • Percentage (%) • Points (pt) • Picas (pica) • Inches (in) • Centimeters (cm) • Milimeters (mm)
  • 32. Absolute Font Size: px • Example: font-size: 12px; • Not proportional to the viewing area.  Always the same.
  • 33. Relative Font Size: em or % • Example: font-size: 1.2em; font-size: 120%; • Proportional to the viewing area.
  • 34. Relative Font Sizing Relative font sizing can be difficult to use. Hereʼs one strategy: •Browser default sizing for fonts is roughly 16pt.  62.5% resets the default size to roughly 10pt, which makes it easier to do the math •1em translates 10pt •1.2em translates to 12pt body {     font-size: 62.5%; } p{     font-size: 1.2em;  }
  • 35. Relative Font Sizing • Nested elements affect each other • If an element has a font size of 80% and is nested within an element that also has a font size of 80%, then the result is a font size of 64% • That's 80% of 80% • This could be a lot smaller than you might have wanted.
  • 36. Embedded, Linked, and Inline Stylesheets
  • 37. Embedded • Embedded Style Sheet: are placed within the header, within a Web page <html> <head> <style type="text/css"> h1 {     font-family: Georgia, Times New Roman, serif; } </style> </head> <body> </body> </html>
  • 38. Linked • Linked Style Sheet: All CSS rules are saved in a .css file <html> <head> <link rel="stylesheet" href="css/global.css" type="text/css" /> </head> <body>  </body> </html>
  • 39. Inline • Inline Styles: declarations can be placed within a single tag as a style attribute <html> <head> </head> <body>  <p>What color is a cucumber?</p> <p style="color:#00FF00;font-weight:bold;">A cucumber is green.</p> </body> </html> 
  • 40. Group Projects are due next week
  • 41. Homework due Sept 22 • Read chapter “Graphics” in Web Style Guide • Complete Group Projects • Next week: formatting images for the Web