1. Home
  2. Computing & Technology
  3. Web Design / HTML

Styling Tables, Frames, and Forms

By , About.com Guide

< Previous - CSS Positioning and Layout | Quick CSS Course (5 days) | Beginning CSS Articles | Next - Advanced CSS Topics >

CSS and HTML Tables:

Styling HTML tables makes them more usable. The most obvious styles are on the borders of the table and the colors of the cells. But you can also style elements of the thead, tfoot, and tbody. By learning all you can about how to code HTML tables, you can style them better.

td, th {
border: 1px #ccc solid;
background-color: yellow;
}
CSS and HTML Frames:

HTML frames are a lot like HTML tables, when you style them, you often style the borders and background-colors. But you should also consider each frame in a frameset as a separate HTML page, and style it accordingly. Also, don't forget to style the noframes page - while most browsers that can't see frames cannot see CSS either, it's a good idea to style them just in case. And if you use the same style sheet as the rest of your site, it won't cause extra work.

CSS and HTML Forms:

Styling forms makes them both more usable and easier to look at. The standard HTML form can be very ugly, but if you get in the habit of using labels, fieldsets, and legends and then styling all the elements, you can create forms that are pretty and people want to fill out.

< Previous - CSS Positioning and Layout | Quick CSS Course (5 days) | Beginning CSS Articles | Next - Advanced CSS Topics >

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Beginning CSS
  6. CSS Tutorial
  7. Styling Tables, Frames, and Forms - CSS for HTML Tables, CSS for HTML Frames, CSS for HTML Forms>

©2009 About.com, a part of The New York Times Company.

All rights reserved.