SlideShare a Scribd company logo
2
(X)HTML: The Basics
Using Tables
Table Tags
•   <table>Content Here</table>
    •   Creates the table


•   <tr>Content Here</tr>
    •   Defines each row of the table


•   <td>Content Here</td>
    •   Defines the content (data) contained within each cell of the table


•   <th>Content Here</th>
    •   Used to create headers for rows and/or columns
Commonly Used Attributes
•   bgcolor                                                   •   cellspacing
    •   Defines the background color for an entire table, an       •   Defines the space between cells
        entire row or a single cell
                                                                  •   <table cellspacing="10">Content Here</table>
    •   Table


    •
        •   <table bgcolor="#ffff00">Content Here</table>
                                                              •   cellpadding
        Row
                                                                  •   Defines the space within a cell between the content
        •   <tr bgcolor="#ffff00">Content Here</tr>                   and the cell wall
    •   Data Cell                                                 •   <table cellpadding="10">Content Here</table>
        •   <td bgcolor="#ffff00">Content Here</td>
    •   Header Cell                                           •   colspan
        •   <th bgcolor="#ffff00">Content Here</th>               •   Defines how many columns a cell should take up
                                                                  •   How many cells across
•   border                                                        •   <th colspan="2">Content Here</th>
    •   Defines your table’s border                                •   <td colspan="5">Content Here</td>
    •   <table border="2">Content Here</table>
                                                              •   rowspan
•   bordercolor                                                   •   Defines how many rows a cell should take up
    •   Defines the color of your table’s border                   •   How many cells down
    •   <table bordercolor="#ffff00">Content Here</table>         •   <th rowspan="4">Content Here</th>
                                                                  •   <td rowspan="3">Content Here</td>
Putting it to Work
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://
www.w3.org/TR/html4/strict.dtd">
<html>
<title>Using Tables</title>
<body>
<table border="2" bordercolor="#669999">
<tr><td bgcolor="ffff00">&nbsp;</td>
    <th>Monday</th>
    <th>Tuesday</th>
    <th><font face="impact" font color =#336699>Wednesday</
    font></th>
    </tr>
<tr><th>9:00 AM - 10:00 AM</th>
    <td>Web Publishing</td>
    <td>Graphic Design II</td>
    <td>Algebra II</td>
    </tr>
<tr><th>1:00 PM - 2:00 PM</th>
    <td>Web Publishing</td>
    <td>English Comp.</td>
    <td>Algebra II</td>
    </tr>
<tr><th><font face="verdana" color="#660000">1:00 PM - 2:00
PM</th>
    <td><i>Web Publishing</i></td>
    <td><font color="#330066">Graphic Design II</font></td>
    <td><font face="mistral">English Comp.</td>
    </tr>
</table>
</body>
</html>
Now Add Cellpadding & Cellspacing
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://
www.w3.org/TR/html4/strict.dtd">
<html>
<title>Using Tables</title>
<body>
<table border="2" bordercolor="#669999" cellpadding="10"
cellspacing="20">
<tr><td bgcolor="ffff00">&nbsp;</td>
    <th>Monday</th>
    <th>Tuesday</th>
    <th><font face="impact" font color =#336699>Wednesday</
    font></th>
    </tr>
<tr><th>9:00 AM - 10:00 AM</th>
    <td>Web Publishing</td>
    <td>Graphic Design II</td>
    <td>Algebra II</td>
    </tr>
<tr><th>1:00 PM - 2:00 PM</th>
    <td>Web Publishing</td>
    <td>English Comp.</td>
    <td>Algebra II</td>
    </tr>
<tr><th><font face="verdana" color="#660000">1:00 PM - 2:00
PM</th>
    <td><i>Web Publishing</i></td>
    <td><font color="#330066">Graphic Design II</font></td>
    <td><font face="mistral">English Comp.</td>
    </tr>
</table>
</body>
</html>
Now Add Colspan & Rowspan
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<title>Using Tables</title>
<body text="white">
<table border="2" bordercolor="#669999" cellpadding="10" cellspacing="20">
<tr bgcolor="#999966"><td bgcolor="#ffffcc">&nbsp;</td>
    <td colspan="2"><font face="mistral" color="ffffcc" size="8">Vegetables</font></td>
    <td colspan="2"><font face="mistral" color="ffffcc" size="8">Fruits</font></td>
    </tr>
<tr bgcolor="#CC0000"><td rowspan="2"><font color="ffffcc" size="5" face="impact">Red</font></td>
    <td>Red Peppers</td>
    <td>Radishes</td>
    <td>Strawberries</td>
    <td>Apples</td>
    </tr>
<tr bgcolor="#CC0000"><td>Red Cabbage</td>
    <td>Beets</td>
    <td>Cherries</td>
    <td>Raspberries</td>
    </tr>
<tr bgcolor="#00CC66"><td rowspan="2"><font color="ffffcc" size="5" face="impact">Green</font></td>
    <td>Spinach</td>
    <td>Asparagus</td>
    <td>Grapes</td>
    <td>Lime</td>
    </tr>
</table>
</body>
</html>
HTML Lecture Part 2 of 2
More About Borders
Default=No Border
• By default, tables do not have borders
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
  <html>
  <title>Working With Tables</title>
  <body>
  <table>
  <tr><td>apples</td> <td>oranges</td></tr>
  <tr><td>bananas</td> <td>pineapples</td></tr>
  </table>
  </body>
  </html>



• Borders are measured in pixels
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  "http://www.w3.org/TR/html4/strict.dtd">
  <html>
  <title>Working With Tables</title>
  <body>
  <table border="3">
  <tr><td>apples</td> <td>oranges</td></tr>
  <tr><td>bananas</td> <td>pineapples</td></tr>
  </table>
  </body>
  </html>
Commonly Used Frame and Rules Attributes
•   frame
    •   Defines which outside borders are visible
    •   Values
        •   void—no outer border
            •   <table border=2 frame=void rules=all>




        •   box—borders should appear on all four sides; box is often used with rules="none"
            •  <table border=1 frame=box rules=none>




•   rules
    •   Defines which inside borders are visible
    •   Values
        •   none—no inside borders
        •   all—all inside borders will appear
        •   cols—only borders between columns will appear
        •   rows—only borders between rows will appear
More sources
   http://www.htmlcodetutorial.com/tables/
          http://www.tizag.com/htmlT/
http://www.learningnerd.com/series/xhtml-css
I need more tags!
     http://cedesign.net/help2j.htm
    http://www.w3schools.com/tags/
Web-Safe Fonts
http://www.ampsoft.net/webdesign-l/WindowsMacFonts.html
Web-Safe Colors
     http://ficml.org/jemimap/style/color/wheel.html
 http://www.webmonkey.com/reference/Color_Charts

More Related Content

PPTX
HTML: Tables and Forms
PPT
HTML 5 Tables and Forms
PPTX
Tables and Forms in HTML
PPTX
Html Table
PPTX
HTML Table
PDF
Html tables examples
PPTX
html-table
PDF
Html table tags
HTML: Tables and Forms
HTML 5 Tables and Forms
Tables and Forms in HTML
Html Table
HTML Table
Html tables examples
html-table
Html table tags

What's hot (19)

PDF
Web technology lab manual
PPTX
Web design - Working with tables in HTML
PPTX
Html table
PPTX
HTML Table Tags
PPT
Frames tables forms
PDF
Zen codingcheatsheet
PPTX
TXT
PDF
Web Developement Workshop (Oct 2009 -Day 1)
PDF
Web I - 03 - Tables
DOC
Internet programming lab manual
PPTX
PPT
Tables and Forms in HTML
PPTX
Html 5-tables-forms-frames (1)
DOCX
Web Technology Lab File
DOCX
Practical file(XHTML)web designing
PPT
Html tutorial
DOCX
Caracteristicas Basicas De Htlm
Web technology lab manual
Web design - Working with tables in HTML
Html table
HTML Table Tags
Frames tables forms
Zen codingcheatsheet
Web Developement Workshop (Oct 2009 -Day 1)
Web I - 03 - Tables
Internet programming lab manual
Tables and Forms in HTML
Html 5-tables-forms-frames (1)
Web Technology Lab File
Practical file(XHTML)web designing
Html tutorial
Caracteristicas Basicas De Htlm
Ad

Similar to HTML Lecture Part 2 of 2 (20)

PPTX
Html tables
PPTX
Table and Form HTML&CSS
PPTX
HTML Styles - Cascading Style Sheets Cascading Style Sheets
PDF
HTML (Table and Multimedia): Understanding Web Development Essentials
PPTX
Table structure introduction
PPTX
v4-html-table-210321161424.pptx
DOC
Handout5 tables
PPTX
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn.pptx
PPTX
HTML Tables in Omeka
PPTX
HTML Lesson 6
PPTX
Html and css
PDF
HTML TABLES
PPSX
Computer language - Html tables
PPTX
HTML_Tables Attribut and omformationes.pptx
PPTX
Web development ppt used to design web applocation
PPTX
Web Design HTML for beginners and advanced learners .pptx
PPT
Lecture 2.ppt
PPT
Response Tables.ppt
PDF
ClasServer-Side Development 2: Node.jss08 .pdf
PPT
2. HTML Tables.ppt
Html tables
Table and Form HTML&CSS
HTML Styles - Cascading Style Sheets Cascading Style Sheets
HTML (Table and Multimedia): Understanding Web Development Essentials
Table structure introduction
v4-html-table-210321161424.pptx
Handout5 tables
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn.pptx
HTML Tables in Omeka
HTML Lesson 6
Html and css
HTML TABLES
Computer language - Html tables
HTML_Tables Attribut and omformationes.pptx
Web development ppt used to design web applocation
Web Design HTML for beginners and advanced learners .pptx
Lecture 2.ppt
Response Tables.ppt
ClasServer-Side Development 2: Node.jss08 .pdf
2. HTML Tables.ppt
Ad

Recently uploaded (20)

PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
Complications of Minimal Access Surgery at WLH
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
TR - Agricultural Crops Production NC III.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
RMMM.pdf make it easy to upload and study
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Classroom Observation Tools for Teachers
PDF
Pre independence Education in Inndia.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Complications of Minimal Access Surgery at WLH
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Basic Mud Logging Guide for educational purpose
Microbial diseases, their pathogenesis and prophylaxis
TR - Agricultural Crops Production NC III.pdf
O7-L3 Supply Chain Operations - ICLT Program
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Introduction_to_Human_Anatomy_and_Physiology_for_B.Pharm.pptx
Abdominal Access Techniques with Prof. Dr. R K Mishra
102 student loan defaulters named and shamed – Is someone you know on the list?
2.FourierTransform-ShortQuestionswithAnswers.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
RMMM.pdf make it easy to upload and study
GDM (1) (1).pptx small presentation for students
Classroom Observation Tools for Teachers
Pre independence Education in Inndia.pdf

HTML Lecture Part 2 of 2

  • 3. Table Tags • <table>Content Here</table> • Creates the table • <tr>Content Here</tr> • Defines each row of the table • <td>Content Here</td> • Defines the content (data) contained within each cell of the table • <th>Content Here</th> • Used to create headers for rows and/or columns
  • 4. Commonly Used Attributes • bgcolor • cellspacing • Defines the background color for an entire table, an • Defines the space between cells entire row or a single cell • <table cellspacing="10">Content Here</table> • Table • • <table bgcolor="#ffff00">Content Here</table> • cellpadding Row • Defines the space within a cell between the content • <tr bgcolor="#ffff00">Content Here</tr> and the cell wall • Data Cell • <table cellpadding="10">Content Here</table> • <td bgcolor="#ffff00">Content Here</td> • Header Cell • colspan • <th bgcolor="#ffff00">Content Here</th> • Defines how many columns a cell should take up • How many cells across • border • <th colspan="2">Content Here</th> • Defines your table’s border • <td colspan="5">Content Here</td> • <table border="2">Content Here</table> • rowspan • bordercolor • Defines how many rows a cell should take up • Defines the color of your table’s border • How many cells down • <table bordercolor="#ffff00">Content Here</table> • <th rowspan="4">Content Here</th> • <td rowspan="3">Content Here</td>
  • 5. Putting it to Work <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:// www.w3.org/TR/html4/strict.dtd"> <html> <title>Using Tables</title> <body> <table border="2" bordercolor="#669999"> <tr><td bgcolor="ffff00">&nbsp;</td> <th>Monday</th> <th>Tuesday</th> <th><font face="impact" font color =#336699>Wednesday</ font></th> </tr> <tr><th>9:00 AM - 10:00 AM</th> <td>Web Publishing</td> <td>Graphic Design II</td> <td>Algebra II</td> </tr> <tr><th>1:00 PM - 2:00 PM</th> <td>Web Publishing</td> <td>English Comp.</td> <td>Algebra II</td> </tr> <tr><th><font face="verdana" color="#660000">1:00 PM - 2:00 PM</th> <td><i>Web Publishing</i></td> <td><font color="#330066">Graphic Design II</font></td> <td><font face="mistral">English Comp.</td> </tr> </table> </body> </html>
  • 6. Now Add Cellpadding & Cellspacing <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:// www.w3.org/TR/html4/strict.dtd"> <html> <title>Using Tables</title> <body> <table border="2" bordercolor="#669999" cellpadding="10" cellspacing="20"> <tr><td bgcolor="ffff00">&nbsp;</td> <th>Monday</th> <th>Tuesday</th> <th><font face="impact" font color =#336699>Wednesday</ font></th> </tr> <tr><th>9:00 AM - 10:00 AM</th> <td>Web Publishing</td> <td>Graphic Design II</td> <td>Algebra II</td> </tr> <tr><th>1:00 PM - 2:00 PM</th> <td>Web Publishing</td> <td>English Comp.</td> <td>Algebra II</td> </tr> <tr><th><font face="verdana" color="#660000">1:00 PM - 2:00 PM</th> <td><i>Web Publishing</i></td> <td><font color="#330066">Graphic Design II</font></td> <td><font face="mistral">English Comp.</td> </tr> </table> </body> </html>
  • 7. Now Add Colspan & Rowspan <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <title>Using Tables</title> <body text="white"> <table border="2" bordercolor="#669999" cellpadding="10" cellspacing="20"> <tr bgcolor="#999966"><td bgcolor="#ffffcc">&nbsp;</td> <td colspan="2"><font face="mistral" color="ffffcc" size="8">Vegetables</font></td> <td colspan="2"><font face="mistral" color="ffffcc" size="8">Fruits</font></td> </tr> <tr bgcolor="#CC0000"><td rowspan="2"><font color="ffffcc" size="5" face="impact">Red</font></td> <td>Red Peppers</td> <td>Radishes</td> <td>Strawberries</td> <td>Apples</td> </tr> <tr bgcolor="#CC0000"><td>Red Cabbage</td> <td>Beets</td> <td>Cherries</td> <td>Raspberries</td> </tr> <tr bgcolor="#00CC66"><td rowspan="2"><font color="ffffcc" size="5" face="impact">Green</font></td> <td>Spinach</td> <td>Asparagus</td> <td>Grapes</td> <td>Lime</td> </tr> </table> </body> </html>
  • 10. Default=No Border • By default, tables do not have borders <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <title>Working With Tables</title> <body> <table> <tr><td>apples</td> <td>oranges</td></tr> <tr><td>bananas</td> <td>pineapples</td></tr> </table> </body> </html> • Borders are measured in pixels <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <title>Working With Tables</title> <body> <table border="3"> <tr><td>apples</td> <td>oranges</td></tr> <tr><td>bananas</td> <td>pineapples</td></tr> </table> </body> </html>
  • 11. Commonly Used Frame and Rules Attributes • frame • Defines which outside borders are visible • Values • void—no outer border • <table border=2 frame=void rules=all> • box—borders should appear on all four sides; box is often used with rules="none" • <table border=1 frame=box rules=none> • rules • Defines which inside borders are visible • Values • none—no inside borders • all—all inside borders will appear • cols—only borders between columns will appear • rows—only borders between rows will appear
  • 12. More sources http://www.htmlcodetutorial.com/tables/ http://www.tizag.com/htmlT/ http://www.learningnerd.com/series/xhtml-css
  • 13. I need more tags! http://cedesign.net/help2j.htm http://www.w3schools.com/tags/
  • 15. Web-Safe Colors http://ficml.org/jemimap/style/color/wheel.html http://www.webmonkey.com/reference/Color_Charts