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

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
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
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
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
 
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
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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...
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
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
 
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
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
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
 

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