Toggle Menu
  • Home
    • About Us
    • Contact
    • Portfolio
  • Expression Web 4
    • Installing Expression Web 4
    • Setting Up Expression Web 4.0
    • Create New Website
    • Create a Blank Web Page
    • Create a Webpage Layout
    • Adding Horizontal Top Navigation
    • Adding Vertical Navigation
    • Validating Your Pages
    • Creating an Expression Web Dynamic Web Template
    • Publishing Your Web Site
    • How to back up your local website on your hard drive
    • SEO Checker and Report
  • Tutorials
    • Adding Insert Include Code into Code Snippets
    • Auto Thumbnail in Expression Web
    • Broken Dynamic Web Templates and hidden metadata files
    • Code Snippets in Expression Web
    • Compatibility Checker on Status Bar in Expression Web
    • Create and Style a Data Table
    • Creating a New Font Family Group
    • Creating a New Page from Hyperlink Properties
    • Creating web site from site templates in Expression Web
    • CSS Properties panel
    • Expression Web Preview in Browser
    • Expression Web and Design Time Includes
    • How to back up your local website on your hard drive
    • How to create a Personal Web Package
    • Import Site Wizard in Expression Web
    • Importing your folders/files into Expression Web
    • Inserting Images in Expression Web
    • Interactive Buttons in Expression Web
    • Migrating a FrontPage Site to Expression Web
    • Modify Style Dialog Box
    • New Style Dialog Box
    • Publishing Your Website from the Remote Server with FrontPage Server Extensions
    • Editing Reusable Forms
    • Troubleshooting Image Problems in Expression Web
    • Using the Expression Web SEO Checker and Report
    • Validation Error - no attribute "xmlns:v"
    • Web Album Generator and Expression Web
    • What are all the style# in my page?
    • Zoom Search and Expression Web
    • Working With Left Border Background Images
  • Resources
    • Accessible Color - Color Contrast
    • CSS Basics
    • Expression Web eBooks
    • Guide to Dealing With Google's Malware Warnings
    • Free Forms
    • Learn HTML
    • Migrating from FrontPage to Expression Web
    • Newbies
    • Search Engine Optimization - SEO
  • Templates
    • Complete Site Templates
    • Expression Web In Box Templates
    • Dynamic Web Templates
    • Mobile Friendly Site Templates
    • Crafting Series
    • Christmas Templates
  • Web Design Tutorials
    • Accessible Forms
    • Add a Search Box
    • Adding Google Search
    • Accessible Data and Layout Tables
    • Anchor Tags and Name Attributes
    • Best Font Size for Web Design?
    • Center Page in Browser Window
    • HTML Lists
    • How to create and extract a Zip File in Windows
    • How to Create a Self-Extracting Zip File
    • Validation Error - no attribute "xmlns:v"
    • Working With Left Border Background Images
    • Handle Background Transparency in Snagit Editor Like You Would in Photoshop
  • Bluehost Tutorials
    • Add-on Domains at BlueHost
    • BlueHost 301 Redirects
    • BlueHost Webmail
    • Customizing BlueHost Error Pages
    • How to make a subfolder the main folder for your BlueHost main domain
    • How to change the Primary Domain
    • Installing a WordPress Blog Using Simple Scripts
    • Mannaging SSL on BH
    • Password Protecting Directories and/or Files with Bluehost
    • Server Side Includes, BlueHost, and Expression Web
  • Expression Web Addins
    • Ajatix Email Spam Blocker
    • Ajatix Advanced CSS Drop Down Menu
    • Ajatix Lightbox Add-In
    • Ajatix Image / Banner Slider

Create and Style a Data Table

First, make sure that you have set up Expression Web using Tina Clarke's FREE EBook Setting Up Expression Web 3.0 or 4.0

Step 1: In Design view, place the insertion point where you want to insert the table.  Do the following:

  • On the Menu > Table > Insert Table.
    NOTE
    : Do NOT Choose Layout Table
    NOTE: With Expression Web 4.0, Layout Table is NOT an option.
    Screenshot Insert Table Menu.
  • On the Common or Standard toolbar, click the Insert Table button, then use your pointer to draw the table; OR Click More Options
    Screenshot Insert Table Button.
  • Set the properties that you want.
    Screenshot Insert Tables Dialogue Box.
    Click thumbnail for a larger image
    Example Settings in Bold


    Size: Set the number of Rows and Columns in your table. Rows: 25: Columns: 8.
    Alignment: Set the horizontal alignment of your table. Default
    Float: Set the floating property of your table. Default
    Specify width: Set the width of your table. 100%
    Specify height: Set the height of your table.  Leave Blank
    Cell padding: Set the padding between cells. 1
    Cell spacing: Set the spacing within cells. 2
    Borders: Set the size and color of your table borders. 1 #999999  Tick: Collapse Table Border.
    Background: Set the color or background picture you want as your table background.

The following code was added to the head section of my page:

<style type="text/css"> .style1 { width: 100%; border-collapse: collapse; border: 1px solid #999999; } </style>

Step 2: On the Manage Styles task panel, > Right Click the just created style1. > Choose rename class "style1."
Screenshot renmame class style.

In the Rename Class Dialog Box, Type "tombstones" or whatever you want to name the class. Make sure Rename class references in this page is ticked.

Screenshot rename class.

You will see that the class has been renamed "tombstones," and the code for your table changed to:

<table class="tombstones">

Step 3: From the Manage or Apply Styles task panel, > Click New Style.

In the New Style dialog box, type or select the following:

Screenshot Create New Style Dialogue Box.
Click thumbnail for larger image

Selector: Type .tombstone td
Define In: Current Page
Block: vertical-align: top
Border: sold ipx #999999
Box: padding 5px (untick: Same for all if you do NOT want the same amount of padding in the cells.

You will see the style being created in the display area.

Click OK, and the styles will be applied to the table cells.

Step 4: If you want the top row to be a header row, > select the first row of data cells. > Right click > Cell Properties > Tick: header cell. > Click OK.

You can create a new style for the header row by using the same method as described above, OR copy and paste the style you created for:  

.tombstones td { vertical-align: top; border: 1px solid #999999; padding: 5px; }

changing the td to th. The default style will be centered and bold

.tombstones th { vertical-align: top; border: 1px solid #999999; padding: 5px; }

Example: Blank Styled Table

Style an Already Created Data Table

If you have a data table already created, you can easily add styling to it.

Step 1: Open the page with the table you wish to style in Expression Web.

From the Quick Tag Selector, > Click <table>.

From the Manage or Apply Styles task panel, > Click New Style.

In the New Style dialog box, type or select the following:

Selector: Type .prisoners
Define in: Current Page
Border: solid 1px #999999
Box: Uncheck:  Margins Same for All Top: 10px Bottom: 10 px (this will add some spacing between the top and bottom of your table from other text.
Position: width: 100%

Make sure you have ticked Apply Style to document selection

The following code will be added to the head section of your page

<style type="text/css"> .prisoners { border: 1px solid #999999; width: 100%; border-collapse: collapse; margin-top: 10px; margin-bottom: 10px; } </style>

Step 3: From the Manage or Apply Styles task panel, > Click New Style.

In the New Style dialog box, type or select the following:

Selector: Type .prisoners td
Define In: Current Page
Block: vertical-align: top
Border: sold ipx #999999
Box: padding 5px (untick: Same for all if you do NOT want the same amount of padding in the cells.

You will see the style being created in the display area.

Click OK, and the styles will be applied to the table cells.

Step 4: If you want the top row to be a header row > select the first row of data cells, > right click > Cell Properties > Tick: header cell > Click OK.

You can create a new style for the header row by using the same method as described above OR copy and paste the style you created for: 

.prisoners td { vertical-align: top; border: 1px solid #999999; padding: 5px; }

changing the td to th. The default style will be centered and bold

.prisoners th { vertical-align: top; border: 1px solid #999999; padding: 5px; }

Example: Fully Styled Data Table

Points to Remember in Working With Tables

  • Consider the size of your table. Remember, not everyone has a high speed Internet connection. If you have a very large table, consider breaking it into smaller tables.
  • If you want the table centered on the page, add auto for the left and right margins.
  • If you will be using the same styling on more than one table, move the table styles to an external style sheet where you can use them over and over again.
  • Using this method, your table code remains clean and your styles can be modified much more easily.
  • You can add other style rules to the classes like font-size:small.
  • Make your tables accessible

Sample Styled Accessible Table Using External Style Sheet


Copyright © January 2010 Pat Geary of Expression Web Tutorials and Templates, All Rights Reserved



Expression Web 4.0 Tutorials 2nd Edition from Install to Publish, a FREE EBook by Pat Geary.

Expression Web 4.0 Tutorials 2nd Edition from Install to Publish, a FREE EBook by Pat Geary.

Join our Facebook Group for Expression Web.

Expression Web has a group on Facebook. If you are a FB user, come join us.

Signup for BlueHost hosting account.

Disclosure: This is an affiliate link, which means that if you visit Bluehost.com through this link and purchase this product, I’ll get a commission.

Microsoft MVP Logo.
April 2007 - April 2013

Privacy Policy |  Migrating from FrontPage to Expression Web

Microsoft® and Expression Web® are registered trademarks of Microsoft® Corporation.

Site Design & Maintenance : Expression Web Tutorials & Templates