SlideShare a Scribd company logo
1 of 9
Download to read offline
Creating a Layout with HTML Tables
Create a New Aptana Project

   ●   Create a new Aptana Project named “Class 3 Tables”. Change the name of your HTML
       page to funWithTables.html. Create a new stylesheet called tables.css and link the
       stylesheet to your HTML page in your new project.




   ●   Inside the body, add a <table> element with three nested <tr> table row elements.
       <table>
               <tr>
               </tr>
               <tr>
               </tr>
               <tr>
               </tr>
       </table>




                                                                                            1
●   In the first table row, we will add a <td> column with a colspan of 3 for our header
    <td colspan=”3”>This is the Header</td>




●   In the second table row, we will add three <td> columns for our left, middle and right
    columns
    <td>left col</td>
    <td>middle col</td>
    <td>right col</td>




●   In the third table row, we will add a <td> column with a colspan=”3” for our footer
    <td colspan=”3”>This is the footer</td>




                                                                                             2
●   Now we can preview our page. It doesn’t look like much. Time for some CSS!




●   The first thing we will do is add a body element selector to our tables.css file with a
    declaration for a text-align property to center our page
    body
    {
            text-align: center;
    }




                                                                                              3
●   Next we will add a table element selector to our tables.css file with a declaration for our
    margin
    table
    {
           margin: 0 auto;
    }




●   Now let’s add some classes to our CSS and HTML to make our three column layout.
    First, add a class called “header” to your 3 colspan <td> in your first table row.
    <td colspan="3" class="header">this is the header</td>




●   Now add the class selector to your tables.css


                                                                                                  4
.header {
           text-align: center;
    }




●   We will want to do the same thing with the footer, so add a class called “footer” to your 3
    colspan <td> in your last table row.
    <td colspan="3" class="footer">this is the header</td>




●   And since we want to treat the CSS the same for the .header and .footer classes, we
    can just add .footer to the class selector we are using for .header.
    .header, .footer {
           text-align: center;
     }


                                                                                              5
●   Let’s add a 3 px black border to our table rows and cells
    tr, td {
             border: 3px solid black;
    }




                                                                6
●   Now this is what we should see when we preview our page in Aptana




●   Let’s add some style to the left column and right column. We will add a class called
    sideCells to the first and second <td> cells in our second table row.
    <td class="sideCells">left col</td>
    <td>middle col</td>
    <td class="sideCells">right col</td>




                                                                                           7
●   Now we will add a class selector for .sideCells to our tables.css file with declarations for
    width, background-color, color and padding properties
    .sideCells {
            width: 200px;
            background-color: purple;
            color: white;
            padding: 10px;
    }




●   This is what our Aptana preview page should look like now




●   We need to create one more class selector for our middle column and add the class
    name to the second <td> element in our second table row.

    In our HTML:
    <td class="middleCell">middle col</td>


                                                                                                   8
In our tables.css:
.middleCell {
        width: 500px;
        padding: 10px;
        height: 400px;
}

Now our page looks like this:




                                9

More Related Content

Viewers also liked

Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Erin M. Kidwell
 
infecções de pele e anexos
infecções de pele e anexos infecções de pele e anexos
infecções de pele e anexos Anna de Melo
 
The gujarati language
The gujarati languageThe gujarati language
The gujarati languageRajan Bhatt
 
SNS와 Privacy
SNS와 PrivacySNS와 Privacy
SNS와 Privacy우섭 이
 
증강현실과 가상현실
증강현실과 가상현실증강현실과 가상현실
증강현실과 가상현실우섭 이
 
Class 1 handout (2) html exercises
Class 1 handout (2) html exercisesClass 1 handout (2) html exercises
Class 1 handout (2) html exercisesErin M. Kidwell
 
Class 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetClass 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetErin M. Kidwell
 

Viewers also liked (8)

Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
Girl Develop It Cincinnati: Intro to HTML/CSS Class 1
 
infecções de pele e anexos
infecções de pele e anexos infecções de pele e anexos
infecções de pele e anexos
 
The gujarati language
The gujarati languageThe gujarati language
The gujarati language
 
LTE
LTELTE
LTE
 
SNS와 Privacy
SNS와 PrivacySNS와 Privacy
SNS와 Privacy
 
증강현실과 가상현실
증강현실과 가상현실증강현실과 가상현실
증강현실과 가상현실
 
Class 1 handout (2) html exercises
Class 1 handout (2) html exercisesClass 1 handout (2) html exercises
Class 1 handout (2) html exercises
 
Class 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheetClass 2 handout (1) adding a css stylesheet
Class 2 handout (1) adding a css stylesheet
 

Similar to Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (aptana)

Similar to Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (aptana) (20)

WEP4 and 5.pptx
WEP4 and 5.pptxWEP4 and 5.pptx
WEP4 and 5.pptx
 
4-Tables in HTMLhtml tavle table in the html
4-Tables in HTMLhtml tavle table in the html4-Tables in HTMLhtml tavle table in the html
4-Tables in HTMLhtml tavle table in the html
 
Html tables
Html tablesHtml tables
Html tables
 
Chapter 4 class presentation
Chapter 4 class presentationChapter 4 class presentation
Chapter 4 class presentation
 
Chapter 4 class presentation
Chapter 4 class presentationChapter 4 class presentation
Chapter 4 class presentation
 
Html tables
Html tablesHtml tables
Html tables
 
Html tables
Html tablesHtml tables
Html tables
 
HTMLTables.ppt
HTMLTables.pptHTMLTables.ppt
HTMLTables.ppt
 
Les10
Les10Les10
Les10
 
CSS
CSSCSS
CSS
 
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...Managing user Online Training in IBM Netezza DBA Development by www.etraining...
Managing user Online Training in IBM Netezza DBA Development by www.etraining...
 
Tables in databases - Relationships and diagrams
Tables in  databases - Relationships and diagramsTables in  databases - Relationships and diagrams
Tables in databases - Relationships and diagrams
 
Css introduction
Css  introductionCss  introduction
Css introduction
 
HTML Tables in Omeka
HTML Tables in OmekaHTML Tables in Omeka
HTML Tables in Omeka
 
Les09
Les09Les09
Les09
 
Html table
Html tableHtml table
Html table
 
Les10 Creating And Managing Tables
Les10 Creating And Managing TablesLes10 Creating And Managing Tables
Les10 Creating And Managing Tables
 
htmltable.pptx
htmltable.pptxhtmltable.pptx
htmltable.pptx
 
Html web designing using tables
Html web designing using tablesHtml web designing using tables
Html web designing using tables
 
Table and Form HTML&CSS
Table and Form HTML&CSSTable and Form HTML&CSS
Table and Form HTML&CSS
 

Recently uploaded

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
+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...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
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
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 

Class 3 Intro to HTML/ CSS Gdi cincinnati create a table layout with html (aptana)

  • 1. Creating a Layout with HTML Tables Create a New Aptana Project ● Create a new Aptana Project named “Class 3 Tables”. Change the name of your HTML page to funWithTables.html. Create a new stylesheet called tables.css and link the stylesheet to your HTML page in your new project. ● Inside the body, add a <table> element with three nested <tr> table row elements. <table> <tr> </tr> <tr> </tr> <tr> </tr> </table> 1
  • 2. In the first table row, we will add a <td> column with a colspan of 3 for our header <td colspan=”3”>This is the Header</td> ● In the second table row, we will add three <td> columns for our left, middle and right columns <td>left col</td> <td>middle col</td> <td>right col</td> ● In the third table row, we will add a <td> column with a colspan=”3” for our footer <td colspan=”3”>This is the footer</td> 2
  • 3. Now we can preview our page. It doesn’t look like much. Time for some CSS! ● The first thing we will do is add a body element selector to our tables.css file with a declaration for a text-align property to center our page body { text-align: center; } 3
  • 4. Next we will add a table element selector to our tables.css file with a declaration for our margin table { margin: 0 auto; } ● Now let’s add some classes to our CSS and HTML to make our three column layout. First, add a class called “header” to your 3 colspan <td> in your first table row. <td colspan="3" class="header">this is the header</td> ● Now add the class selector to your tables.css 4
  • 5. .header { text-align: center; } ● We will want to do the same thing with the footer, so add a class called “footer” to your 3 colspan <td> in your last table row. <td colspan="3" class="footer">this is the header</td> ● And since we want to treat the CSS the same for the .header and .footer classes, we can just add .footer to the class selector we are using for .header. .header, .footer { text-align: center; } 5
  • 6. Let’s add a 3 px black border to our table rows and cells tr, td { border: 3px solid black; } 6
  • 7. Now this is what we should see when we preview our page in Aptana ● Let’s add some style to the left column and right column. We will add a class called sideCells to the first and second <td> cells in our second table row. <td class="sideCells">left col</td> <td>middle col</td> <td class="sideCells">right col</td> 7
  • 8. Now we will add a class selector for .sideCells to our tables.css file with declarations for width, background-color, color and padding properties .sideCells { width: 200px; background-color: purple; color: white; padding: 10px; } ● This is what our Aptana preview page should look like now ● We need to create one more class selector for our middle column and add the class name to the second <td> element in our second table row. In our HTML: <td class="middleCell">middle col</td> 8
  • 9. In our tables.css: .middleCell { width: 500px; padding: 10px; height: 400px; } Now our page looks like this: 9