SlideShare a Scribd company logo
1 of 21
Download to read offline
css lists
and tables
More styling techniques
Styling lists

• You can change the appearance and the
  types of bullets (for unordered lists) and
  numbers (for ordered lists)
Speed test 01
1.   Rock
     •  Eraserheads
     •  Franco
     •  Urbandub
2.   Pop
     •  KC Concepcion
     •  Erik Santos
     •  Sexbomb Dancers
3.   Hip-hop
     •  Andrew E
     •  Francis M
     •  Dice and K9
Speed test 01
<ol>
<li>Rock<ul>
      <li>Eraserheads</li>
      <li>Franco</li>
      <li>Urbandub</li>
</ul></li>
<li>Pop<ul>
      <li>KC Concepcion/li>
      <li>Erik Santos</li>
      <li>Sexbomb Dancers</li>
</ul></li>
<li>Hip-hop<ul>
      <li>Andrew E</li>
      <li>Francis M</li>
      <li>Dice and K9</li>
</ul></li>
</ol>
List Properties
• rule: ul   {list-style-type:value;}

  none

  disc

  circle

  square
list properties

• rule: ol   {list-style-type:value;}

  decimal / decimal-leading-zero

  lower-alpha / upper-alpha

  lower-roman / upper-roman
Speed test 02
i.   Rock
       Eraserheads
       Franco
       Urbandub
ii. Pop
           KC Concepcion
           Erik Santos
           Sexbomb Dancers
iii. Hip-hop
           Andrew E
           Francis M
           Dice and K9
Speed test 02
<ol>                              list-style-type:lower-roman;
<li>Rock<ul class=“rock” >        }
      <li>Eraserheads</li>
      <li>Franco</li>             ul.rock{
      <li>Urbandub</li>           list-style-type:none;
</ul></li>                        }
<li>Pop<ul class=“pop” >
      <li>KC Concepcion/li>       ul.pop{
      <li>Erik Santos</li>        list-style-type:circle;
      <li>Sexbomb Dancers</li>    }
</ul></li>
<li>Hip-hop<ul class=“hiphop” >   ul.hiphop{
      <li>Andrew E</li>           list-style-type:square;
      <li>Francis M</li>          }
      <li>Dice and K9</li>
</ul></li>
</ol>
ol{
List Properties

•   list-style-
    image:url(‘filename.gif’);

•   list-style-position:inside;
Styling Tables

• Not much new rules
• Appearance depends heavily on your
  selectors (which elements you will apply
  your rule to)
Speed Test 03
Speed Test 03
<table>                     <tr>
<tr>                        	    <td>3</td>
	    <th>Rank</th>          	    <td>Caloocan</td>
	    <th>City</th>          	    <td>1,378,856</td>
	    <th>Population</th>    </tr>
</tr>                       <tr>
<tr>                        	    <td>4</td>
	    <td>1</td>             	    <td>Davao City</td>
	    <td>Quezon City</td>   	    <td>1,363,337</td>
	    <td>2,679,450</td>     </tr>
</tr>                       <tr>
<tr>                        	    <td>5</td>
	    <td>2</td>             	    <td>Cebu City</td>
	    <td>Manila</td>        	    <td>798,809</td>
	    <td>1,660,714</td>     </tr>
</tr>                       </table>
Styling tables
border: 1px solid black;
width:100%;
height:30px;
text-align:center;
vertical-align:center;
padding:5px;
background-color:dimgray;
color:black;
borders
border-collapse:collapse;

border-width:3px;
border-style:dashed;
border-color:green;


border-left-width:thick;
border-bottom-style:solid;
border-right-color:blue;
Borders
Speed Test 04
Speed Test 04

table {
border:2px solid black;
text-align:center;
}
Speed Test 05
Speed Test 05
td{
border-top:2px solid black;
}
th, td{
padding:10px;
}
Speed Test 06
Speed Test 06
table{
border-collapse:collapse;
}
th{
background-color:maroon;
color:white;
border-bottom:2px solid black;
}

More Related Content

What's hot (20)

Javascript basics
Javascript basicsJavascript basics
Javascript basics
 
Html 5 New Features
Html 5 New FeaturesHtml 5 New Features
Html 5 New Features
 
CSS for Beginners
CSS for BeginnersCSS for Beginners
CSS for Beginners
 
Bootstrap
BootstrapBootstrap
Bootstrap
 
Css floats
Css floatsCss floats
Css floats
 
Flexbox
FlexboxFlexbox
Flexbox
 
CSS Grid
CSS GridCSS Grid
CSS Grid
 
CSS
CSSCSS
CSS
 
CSS
CSSCSS
CSS
 
How to learn HTML in 10 Days
How to learn HTML in 10 DaysHow to learn HTML in 10 Days
How to learn HTML in 10 Days
 
Lab #2: Introduction to Javascript
Lab #2: Introduction to JavascriptLab #2: Introduction to Javascript
Lab #2: Introduction to Javascript
 
Intro to html 5
Intro to html 5Intro to html 5
Intro to html 5
 
CSS Basics
CSS BasicsCSS Basics
CSS Basics
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
Html
HtmlHtml
Html
 
How Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) WorksHow Cascading Style Sheets (CSS) Works
How Cascading Style Sheets (CSS) Works
 
Html5 tutorial for beginners
Html5 tutorial for beginnersHtml5 tutorial for beginners
Html5 tutorial for beginners
 
Tables and forms with HTML, CSS
Tables and forms with HTML, CSS  Tables and forms with HTML, CSS
Tables and forms with HTML, CSS
 
HTML Semantic Elements
HTML Semantic ElementsHTML Semantic Elements
HTML Semantic Elements
 
CSS3 Media Queries
CSS3 Media QueriesCSS3 Media Queries
CSS3 Media Queries
 

More from Gerson Abesamis (20)

YMSAT Project Proposal Form
YMSAT Project Proposal FormYMSAT Project Proposal Form
YMSAT Project Proposal Form
 
YMSAT Student Primer
YMSAT Student PrimerYMSAT Student Primer
YMSAT Student Primer
 
Final Project
Final ProjectFinal Project
Final Project
 
960 Grid System
960 Grid System960 Grid System
960 Grid System
 
CSS Box Model
CSS Box ModelCSS Box Model
CSS Box Model
 
Photography Orientation 11-12
Photography Orientation 11-12Photography Orientation 11-12
Photography Orientation 11-12
 
WebDev2 Orientation 11-12
WebDev2 Orientation 11-12WebDev2 Orientation 11-12
WebDev2 Orientation 11-12
 
Photography Class 11-12
Photography Class 11-12Photography Class 11-12
Photography Class 11-12
 
Prewar report
Prewar reportPrewar report
Prewar report
 
Typo Graphics
Typo GraphicsTypo Graphics
Typo Graphics
 
Web Typography
Web TypographyWeb Typography
Web Typography
 
Typographic Contrast
Typographic ContrastTypographic Contrast
Typographic Contrast
 
WebDev Template Finals
WebDev Template FinalsWebDev Template Finals
WebDev Template Finals
 
Css positioning
Css positioningCss positioning
Css positioning
 
Pinhole photography vale
Pinhole photography valePinhole photography vale
Pinhole photography vale
 
CSS Box Model and Dimensions
CSS Box Model and DimensionsCSS Box Model and Dimensions
CSS Box Model and Dimensions
 
Interface Design
Interface DesignInterface Design
Interface Design
 
CSS Refresher
CSS RefresherCSS Refresher
CSS Refresher
 
Intro to HTML
Intro to HTMLIntro to HTML
Intro to HTML
 
Information Architecture
Information ArchitectureInformation Architecture
Information Architecture
 

CSS Lists and Tables