SlideShare a Scribd company logo
1 of 23
Download to read offline
EASING
INTO WEB
DEVELOPMENT
3.
3 TABLES
1   INTRODUCTION
    2   HTML
    3   TABLES
    4   FORMS
    5   HTTP
    6   CSS
    7   CSS FRAMEWORKS
    8   DIGITAL MEDIA
2   9   USABILITY
What are tables?
3


       Tables can be used to:
         display rows and columns of textual data.
         create effects common to print, such as columns, paragraph
          spacing, hanging indents, extra white space.




         create a complex page layout.
         piece together a complex i
            i        h         l image.
Basic Table Structure
4


     <table> starts a table.
       <tr> table row, starts a new row.
        <td> table data, starts a column with a row.
        </td> ends table data.
       </tr> ends a table row.
     </table> ends a table
                     table.
                                     <TABLE>

                              <TR>   <TD></TD>   <TD></TD>   </TR>
                              <TR>   <TD></TD>   <TD></TD>   </TR>
                              <TR>   <TD></TD>   <TD></TD>   </TR>
                              <TR>   <TD></TD>   <TD></TD>   </TR>


                                     </TABLE>
<table> Attributes
5


       border
           lets you set a border around each cell
       cellspacing
           sets extra space between the cells. Default is 1
       cellpadding
           puts extra space inside the cells
       frame
        f
           Specifies how outer border should be displayed
       rules
           Specifies horizontal/vertical divider lines
       summary
           Specifies table summary for accessibility
       width
           sets the width of table in pixels or percent of window


         <table border 0 width=70% cellspacing 0 cellpadding 0 >
                border=0 idth 70% cellspacing=0 cellpadding=0
6
<tr> Attributes
7


       They are:
          align
             align   content of rows horizontally left, right, or center
          valign
               g
             align   content of rows vertically top, bottom, or middle
       Row attributes override table settings.
        <tr align=left valign=top>
<td> Attributes
8


       Most f
        M of a table's structure and appearance is
                        '
        controlled at the cell level.
         align
           li
           align   content of rows horizontally left, right, or center
         valign
            li
           align   content of rows vertically top, bottom, or middle
         colspan
           makes    cell extend across the specified number of cells
         rowspan
           makes    cell extend across the specified number of rows
         <td align=left valign=top width=50>
Spanning Rows and Columns
9


       Cells in a table can occupy the space of more than
        one row or column via the rowspan or colspan
        attributes of the td element.
                         <table border=2 width=300 cellspacing=5>
                          <tr>
                           <td colspan=2>Philosophers</td>
                          </tr>
                          <tr>
                           <td width=50%>Author</td><td width=50%>Title</td>
                          </tr>
                         </table>


                         <table border=2 width=300 cellspacing=5>
                          <tr>
                           <td rowspan=2>Names</td><td width=50%>Hobbes</td>
                          </tr>
                          <tr>
                           <td width=50%>Locke</td>
                          </tr>
                         </table>
colspan example<p>
     <table border="1" width="75%">
       <tr>
         <td colspan=2>one</td>
         <td>two</td>
       </tr>
       <tr>
         <td>three</td>
         <td>four</td>
         <td>five</td>
       </tr>
       <tr>
         <td colspan=3>six</td>
       </tr>
     </table>


     rowspan example<p>
     <table border="1" width="75%">
       <tr>
          <td rowspan=2>one</td>
          <td>two</td>
          <td rowspan=3>three</td>
       </tr>
       <tr>
          <td>four</td>
       </tr>
        /
       <tr>
          <td>five</td>
          <td>six</td>
       </tr>
     </table>

10
Alignment
11




                                                This text needs to be at the top of the cell.
                                                How do you do it?




     <table border=2 width=300 cellspacing=5>
      <tr>
      <t >
       <td><img src="bread.jpg"></td>
       <td>title</td>
      </tr>
     </table>

     <table border=2 width=300 cellspacing=5>
      <tr>
       <td><img src="bread.jpg"></td>
       <td valign=top>title</td>
               g    p       /
      </tr>
     </table>
Alignment
12




                                                        <table border=2 width=300 cellspacing=5>
                                                         <tr>
                                                          <td><img src="bread.jpg"></td><td>title</td>
                                                         </tr>
                                                        </table>




     This text needs to be in the middle of the cell.
     How do you do it?

     <table border=2 width=300 cellspacing=5>
      <tr>
       <td><img src="bread.jpg"></td><td align=center>title</td>
      </tr>
     </table>
Alignment
13


        While we can align elements via align and valign,
         we should use CSS instead.
Tables for Layout
14


        While the table element was intended for
         displaying tabular data, until the last few years,
         tables were generally used for layout.
15
16
Tables for Layout
17

        Currently, using t bl for layout i not
         C     tl     i tables f l        t is t
         recommended, but is still quite common.
          Table-based    layouts cause p y of problems for
                            y           plenty p
           accessibility, unusual display devices (PDAs, phones,
           etc), and search engines.
          As well, they can be very difficult to modify and
           maintain when complicated.
        Recommended to use CSS instead for most layouts.
         U
          Using   CSS this way is unfortunately somewhat d ff l
                       h            f        l       h difficult.
        Ideally, tables should be used only for displaying
         tabular data.
        Using a table to layout a form is also perhaps okay.
Accessibility Features
18

        A d t table can b h d to comprehend for
           data t bl     be hard t      h df
            Those with sight disabilities
            Search engines
        To help with accessibility, you can
            Add a <caption> element to a table
                Provides descriptive info about table as a whole
                Placed within table
            Table rows can be grouped into <thead>,
             <tbody>, and <tfoot> sections.
                This division enables browsers to support scrolling of table
                 bodies independently of the table header and footer.
                When long tables are printed, the table header and
                 footer information may be repeated on each page that
                 contains table data
                                 data.
Grouping Table Rows
19


        If you use the thead, tfoot and tbody
         elements, you must use every element.
          They should appear in this order: thead, tfoot and
           tbody, so that browsers can render the foot before
           receiving all the data.
        Each of these groups contains <tr> elements.
Grouping Table Rows
20

      <table border="1">
           <caption>This is a caption</caption>
           <thead>
                <tr><th>Artist</th><th>Title</th></tr>
           </thead>
           <tfoot>
                <tr><th colspan="2">This is my CD collection</th></tr>
           </tfoot>
           <tbody>
                <tr>
                     <td>Fred Smith</td>
                     <td>Greatest Songs</td>
                </tr>
                <tr>
                     <td>Randy C
                      td R d Connolly</td>
                                    ll /td
                     <td>Hot HTML Hits</td>
                </tr>
           </tbody>
      </table>
<th> element
21


        If you do not want the bother of row groups, you
         can instead use the <th> element (instead of
         <td> elements) to indicate that cells in the first row
         of a data table are heading cells.
         <table border = "1">
          <tr>
            <th>Header 1</th>
            <th>Header 2</th>
          </tr>
          <tr>
            <td>Cell A</td>
            <td>Cell B</td>
          </tr>
          </t >
         </table>
Header & Data relationship
22


        You can increase the accessibility of your tables by
         establishing the relationship between the individual
         table cells and their headers.
          You do this by adding a unique id to each <th>
           element.
Header & Data relationship
23


     <table summary="This table charts all of the Flames Stanley Cup Appearances">
      <caption>Calgary Flames in the Stanley Cup Final</caption>
      <tr>
         <th id="year">Year</th>
                 y
         <th id="opponent">Opponent</th>
      </tr>
      <tr>
         <td>1986</td>
         <td>Montreal</td>
      </tr>
      <tr>
         <td>1989</td>
         <td>Montreal</td>
      </tr>
       /
      <tr>
         <td>2004</td>
         <td>Tampa Bay</td>
      </tr>
     </table>

     Voice reader would speak the following for the last row "Year 2004 Opponent Tampa Bay"

More Related Content

What's hot

Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTMLMarlon Jamera
 
Html table
Html tableHtml table
Html tableJayjZens
 
Html table tags
Html table tagsHtml table tags
Html table tagseShikshak
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables formsnobel mujuji
 
Html basics 7 table
Html basics 7 tableHtml basics 7 table
Html basics 7 tableH K
 
Session3 part2
Session3 part2Session3 part2
Session3 part2banputer
 
HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2Sharon Wasden
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)club23
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTMLAarti P
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTMLDoncho Minkov
 

What's hot (19)

Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
Html table
Html tableHtml table
Html table
 
Html tables examples
Html tables   examplesHtml tables   examples
Html tables examples
 
Html table tags
Html table tagsHtml table tags
Html table tags
 
html-table
html-tablehtml-table
html-table
 
Html
HtmlHtml
Html
 
Frames tables forms
Frames tables formsFrames tables forms
Frames tables forms
 
Html basics 7 table
Html basics 7 tableHtml basics 7 table
Html basics 7 table
 
Chapter 8: Tables
Chapter 8: TablesChapter 8: Tables
Chapter 8: Tables
 
HTML Table Tags
HTML Table TagsHTML Table Tags
HTML Table Tags
 
Html tables
Html tablesHtml tables
Html tables
 
Session3 part2
Session3 part2Session3 part2
Session3 part2
 
HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2HTML Lecture Part 2 of 2
HTML Lecture Part 2 of 2
 
Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)Html 5-tables-forms-frames (1)
Html 5-tables-forms-frames (1)
 
Web technology lab manual
Web technology lab manualWeb technology lab manual
Web technology lab manual
 
Images and Tables in HTML
Images and Tables in HTMLImages and Tables in HTML
Images and Tables in HTML
 
Tables and Forms in HTML
Tables and Forms in HTMLTables and Forms in HTML
Tables and Forms in HTML
 
HTML basic
HTML basicHTML basic
HTML basic
 
Html tutorial
Html tutorialHtml tutorial
Html tutorial
 

Viewers also liked

ASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server ControlsASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server ControlsRandy Connolly
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentRandy Connolly
 
ASP.NET 07 - Site Navigation
ASP.NET 07 - Site NavigationASP.NET 07 - Site Navigation
ASP.NET 07 - Site NavigationRandy Connolly
 
ASP.NET 10 - Data Controls
ASP.NET 10 - Data ControlsASP.NET 10 - Data Controls
ASP.NET 10 - Data ControlsRandy Connolly
 
Constructing and revising a web development textbook
Constructing and revising a web development textbookConstructing and revising a web development textbook
Constructing and revising a web development textbookRandy Connolly
 

Viewers also liked (8)

ASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server ControlsASP.NET 04 - Additional Web Server Controls
ASP.NET 04 - Additional Web Server Controls
 
WEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web DevelopmentWEB I - 01 - Introduction to Web Development
WEB I - 01 - Introduction to Web Development
 
Web I - 04 - Forms
Web I - 04 - FormsWeb I - 04 - Forms
Web I - 04 - Forms
 
ASP.NET 07 - Site Navigation
ASP.NET 07 - Site NavigationASP.NET 07 - Site Navigation
ASP.NET 07 - Site Navigation
 
ASP.NET 10 - Data Controls
ASP.NET 10 - Data ControlsASP.NET 10 - Data Controls
ASP.NET 10 - Data Controls
 
HTML: An Introduction
HTML: An IntroductionHTML: An Introduction
HTML: An Introduction
 
ASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NETASP.NET 09 - ADO.NET
ASP.NET 09 - ADO.NET
 
Constructing and revising a web development textbook
Constructing and revising a web development textbookConstructing and revising a web development textbook
Constructing and revising a web development textbook
 

Similar to Web I - 03 - Tables (20)

v4-html-table-210321161424.pptx
v4-html-table-210321161424.pptxv4-html-table-210321161424.pptx
v4-html-table-210321161424.pptx
 
Lecture-4.pptx
Lecture-4.pptxLecture-4.pptx
Lecture-4.pptx
 
01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx01 HTML-Tables-1.pptx
01 HTML-Tables-1.pptx
 
HTML Tables in Omeka
HTML Tables in OmekaHTML Tables in Omeka
HTML Tables in Omeka
 
WEP4 and 5.pptx
WEP4 and 5.pptxWEP4 and 5.pptx
WEP4 and 5.pptx
 
Web topic 12 tables in html
Web topic 12  tables in htmlWeb topic 12  tables in html
Web topic 12 tables in html
 
Tables
TablesTables
Tables
 
Html tables
Html tablesHtml tables
Html tables
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 
Handout5 tables
Handout5 tablesHandout5 tables
Handout5 tables
 
HTML Tables.ppt
HTML Tables.pptHTML Tables.ppt
HTML Tables.ppt
 
Working With Tables in HTML
Working With Tables in HTMLWorking With Tables in HTML
Working With Tables in HTML
 
table html web programing
table  html  web programingtable  html  web programing
table html web programing
 
Lecture 5 html table
Lecture 5 html tableLecture 5 html table
Lecture 5 html table
 
Session3 part2
Session3 part2Session3 part2
Session3 part2
 
Html web designing using tables
Html web designing using tablesHtml web designing using tables
Html web designing using tables
 
CSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML SemanticsCSUN 2020: CSS Display Properties Versus HTML Semantics
CSUN 2020: CSS Display Properties Versus HTML Semantics
 
Computer language - Html tables
Computer language - Html tablesComputer language - Html tables
Computer language - Html tables
 
2. HTML Tables.ppt
2. HTML Tables.ppt2. HTML Tables.ppt
2. HTML Tables.ppt
 
HTML
HTMLHTML
HTML
 

More from Randy Connolly

Celebrating the Release of Computing Careers and Disciplines
Celebrating the Release of Computing Careers and DisciplinesCelebrating the Release of Computing Careers and Disciplines
Celebrating the Release of Computing Careers and DisciplinesRandy Connolly
 
Public Computing Intellectuals in the Age of AI Crisis
Public Computing Intellectuals in the Age of AI CrisisPublic Computing Intellectuals in the Age of AI Crisis
Public Computing Intellectuals in the Age of AI CrisisRandy Connolly
 
Why Computing Belongs Within the Social Sciences
Why Computing Belongs Within the Social SciencesWhy Computing Belongs Within the Social Sciences
Why Computing Belongs Within the Social SciencesRandy Connolly
 
Ten-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS DegreeTen-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS DegreeRandy Connolly
 
Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)Randy Connolly
 
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...Randy Connolly
 
Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Randy Connolly
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)Randy Connolly
 
Helping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesHelping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesRandy Connolly
 
Constructing a Web Development Textbook
Constructing a Web Development TextbookConstructing a Web Development Textbook
Constructing a Web Development TextbookRandy Connolly
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for ManagersRandy Connolly
 
Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Randy Connolly
 
17 Ways to Fail Your Courses
17 Ways to Fail Your Courses17 Ways to Fail Your Courses
17 Ways to Fail Your CoursesRandy Connolly
 
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Randy Connolly
 
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesComputing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesRandy Connolly
 
Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Randy Connolly
 
Thinking About Technology
Thinking About TechnologyThinking About Technology
Thinking About TechnologyRandy Connolly
 
A longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataA longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataRandy Connolly
 
Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Randy Connolly
 

More from Randy Connolly (20)

Celebrating the Release of Computing Careers and Disciplines
Celebrating the Release of Computing Careers and DisciplinesCelebrating the Release of Computing Careers and Disciplines
Celebrating the Release of Computing Careers and Disciplines
 
Public Computing Intellectuals in the Age of AI Crisis
Public Computing Intellectuals in the Age of AI CrisisPublic Computing Intellectuals in the Age of AI Crisis
Public Computing Intellectuals in the Age of AI Crisis
 
Why Computing Belongs Within the Social Sciences
Why Computing Belongs Within the Social SciencesWhy Computing Belongs Within the Social Sciences
Why Computing Belongs Within the Social Sciences
 
Ten-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS DegreeTen-Year Anniversary of our CIS Degree
Ten-Year Anniversary of our CIS Degree
 
Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)Careers in Computing (2019 Edition)
Careers in Computing (2019 Edition)
 
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
Facing Backwards While Stumbling Forwards: The Future of Teaching Web Develop...
 
Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)Where is the Internet? (2019 Edition)
Where is the Internet? (2019 Edition)
 
Modern Web Development (2018)
Modern Web Development (2018)Modern Web Development (2018)
Modern Web Development (2018)
 
Helping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing DisciplinesHelping Prospective Students Understand the Computing Disciplines
Helping Prospective Students Understand the Computing Disciplines
 
Constructing a Web Development Textbook
Constructing a Web Development TextbookConstructing a Web Development Textbook
Constructing a Web Development Textbook
 
Web Development for Managers
Web Development for ManagersWeb Development for Managers
Web Development for Managers
 
Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"Disrupting the Discourse of the "Digital Disruption of _____"
Disrupting the Discourse of the "Digital Disruption of _____"
 
17 Ways to Fail Your Courses
17 Ways to Fail Your Courses17 Ways to Fail Your Courses
17 Ways to Fail Your Courses
 
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
Red Fish Blue Fish: Reexamining Student Understanding of the Computing Discip...
 
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing DisciplinesComputing is Not a Rock Band: Student Understanding of the Computing Disciplines
Computing is Not a Rock Band: Student Understanding of the Computing Disciplines
 
Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...Citizenship: How do leaders in universities think about and experience citize...
Citizenship: How do leaders in universities think about and experience citize...
 
Thinking About Technology
Thinking About TechnologyThinking About Technology
Thinking About Technology
 
A longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission dataA longitudinal examination of SIGITE conference submission data
A longitudinal examination of SIGITE conference submission data
 
Web Security
Web SecurityWeb Security
Web Security
 
Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?Is Human Flourishing in the ICT World of the Future Likely?
Is Human Flourishing in the ICT World of the Future Likely?
 

Recently uploaded

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 

Recently uploaded (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 

Web I - 03 - Tables

  • 2. 1 INTRODUCTION 2 HTML 3 TABLES 4 FORMS 5 HTTP 6 CSS 7 CSS FRAMEWORKS 8 DIGITAL MEDIA 2 9 USABILITY
  • 3. What are tables? 3  Tables can be used to:  display rows and columns of textual data.  create effects common to print, such as columns, paragraph spacing, hanging indents, extra white space.  create a complex page layout.  piece together a complex i i h l image.
  • 4. Basic Table Structure 4 <table> starts a table. <tr> table row, starts a new row. <td> table data, starts a column with a row. </td> ends table data. </tr> ends a table row. </table> ends a table table. <TABLE> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> </TABLE>
  • 5. <table> Attributes 5  border  lets you set a border around each cell  cellspacing  sets extra space between the cells. Default is 1  cellpadding  puts extra space inside the cells  frame f  Specifies how outer border should be displayed  rules  Specifies horizontal/vertical divider lines  summary  Specifies table summary for accessibility  width  sets the width of table in pixels or percent of window <table border 0 width=70% cellspacing 0 cellpadding 0 > border=0 idth 70% cellspacing=0 cellpadding=0
  • 6. 6
  • 7. <tr> Attributes 7  They are:  align  align content of rows horizontally left, right, or center  valign g  align content of rows vertically top, bottom, or middle  Row attributes override table settings. <tr align=left valign=top>
  • 8. <td> Attributes 8  Most f M of a table's structure and appearance is ' controlled at the cell level.  align li  align content of rows horizontally left, right, or center  valign li  align content of rows vertically top, bottom, or middle  colspan  makes cell extend across the specified number of cells  rowspan  makes cell extend across the specified number of rows <td align=left valign=top width=50>
  • 9. Spanning Rows and Columns 9  Cells in a table can occupy the space of more than one row or column via the rowspan or colspan attributes of the td element. <table border=2 width=300 cellspacing=5> <tr> <td colspan=2>Philosophers</td> </tr> <tr> <td width=50%>Author</td><td width=50%>Title</td> </tr> </table> <table border=2 width=300 cellspacing=5> <tr> <td rowspan=2>Names</td><td width=50%>Hobbes</td> </tr> <tr> <td width=50%>Locke</td> </tr> </table>
  • 10. colspan example<p> <table border="1" width="75%"> <tr> <td colspan=2>one</td> <td>two</td> </tr> <tr> <td>three</td> <td>four</td> <td>five</td> </tr> <tr> <td colspan=3>six</td> </tr> </table> rowspan example<p> <table border="1" width="75%"> <tr> <td rowspan=2>one</td> <td>two</td> <td rowspan=3>three</td> </tr> <tr> <td>four</td> </tr> / <tr> <td>five</td> <td>six</td> </tr> </table> 10
  • 11. Alignment 11 This text needs to be at the top of the cell. How do you do it? <table border=2 width=300 cellspacing=5> <tr> <t > <td><img src="bread.jpg"></td> <td>title</td> </tr> </table> <table border=2 width=300 cellspacing=5> <tr> <td><img src="bread.jpg"></td> <td valign=top>title</td> g p / </tr> </table>
  • 12. Alignment 12 <table border=2 width=300 cellspacing=5> <tr> <td><img src="bread.jpg"></td><td>title</td> </tr> </table> This text needs to be in the middle of the cell. How do you do it? <table border=2 width=300 cellspacing=5> <tr> <td><img src="bread.jpg"></td><td align=center>title</td> </tr> </table>
  • 13. Alignment 13  While we can align elements via align and valign, we should use CSS instead.
  • 14. Tables for Layout 14  While the table element was intended for displaying tabular data, until the last few years, tables were generally used for layout.
  • 15. 15
  • 16. 16
  • 17. Tables for Layout 17  Currently, using t bl for layout i not C tl i tables f l t is t recommended, but is still quite common.  Table-based layouts cause p y of problems for y plenty p accessibility, unusual display devices (PDAs, phones, etc), and search engines.  As well, they can be very difficult to modify and maintain when complicated.  Recommended to use CSS instead for most layouts. U Using CSS this way is unfortunately somewhat d ff l h f l h difficult.  Ideally, tables should be used only for displaying tabular data.  Using a table to layout a form is also perhaps okay.
  • 18. Accessibility Features 18  A d t table can b h d to comprehend for data t bl be hard t h df  Those with sight disabilities  Search engines  To help with accessibility, you can  Add a <caption> element to a table  Provides descriptive info about table as a whole  Placed within table  Table rows can be grouped into <thead>, <tbody>, and <tfoot> sections.  This division enables browsers to support scrolling of table bodies independently of the table header and footer.  When long tables are printed, the table header and footer information may be repeated on each page that contains table data data.
  • 19. Grouping Table Rows 19  If you use the thead, tfoot and tbody elements, you must use every element.  They should appear in this order: thead, tfoot and tbody, so that browsers can render the foot before receiving all the data.  Each of these groups contains <tr> elements.
  • 20. Grouping Table Rows 20 <table border="1"> <caption>This is a caption</caption> <thead> <tr><th>Artist</th><th>Title</th></tr> </thead> <tfoot> <tr><th colspan="2">This is my CD collection</th></tr> </tfoot> <tbody> <tr> <td>Fred Smith</td> <td>Greatest Songs</td> </tr> <tr> <td>Randy C td R d Connolly</td> ll /td <td>Hot HTML Hits</td> </tr> </tbody> </table>
  • 21. <th> element 21  If you do not want the bother of row groups, you can instead use the <th> element (instead of <td> elements) to indicate that cells in the first row of a data table are heading cells. <table border = "1"> <tr> <th>Header 1</th> <th>Header 2</th> </tr> <tr> <td>Cell A</td> <td>Cell B</td> </tr> </t > </table>
  • 22. Header & Data relationship 22  You can increase the accessibility of your tables by establishing the relationship between the individual table cells and their headers.  You do this by adding a unique id to each <th> element.
  • 23. Header & Data relationship 23 <table summary="This table charts all of the Flames Stanley Cup Appearances"> <caption>Calgary Flames in the Stanley Cup Final</caption> <tr> <th id="year">Year</th> y <th id="opponent">Opponent</th> </tr> <tr> <td>1986</td> <td>Montreal</td> </tr> <tr> <td>1989</td> <td>Montreal</td> </tr> / <tr> <td>2004</td> <td>Tampa Bay</td> </tr> </table> Voice reader would speak the following for the last row "Year 2004 Opponent Tampa Bay"