w1coding.comAll tutorials

CSS Tables

CSS lessons
  1. Environment Setup
  2. Introduction
  3. Tdisplay
  4. Basics
  5. Editors
  6. Syntax
  7. Colors
  8. Background
  9. Borders
  10. Margins
  11. Padding
  12. Width And Height
  13. Outline
  14. Texts
  15. Fonts
  16. Icons
  17. Links
  18. Lists
  19. Display
  20. Tables
  21. Max And With
  22. Positon
  23. Z Index
  24. Dropdown
  25. Overflow
  26. Float
  27. Navigation
  28. Image Sprites

CSS Tables

Introduction to CSS Tables

CSS table properties allow you to control the appearance and layout of table elements.

CSS Table Properties

  • border-collapse: Specifies whether table borders are collapsed or separated.
  • border-spacing: Sets the space between table cells when borders are separated.
  • table-layout: Controls the table layout algorithm (auto or fixed).

Example


table {
    border-collapse: collapse;
    width: 100%;
}
td, th {
    border: 1px solid black;
    padding: 8px;
}
        

Browser Support

All major browsers support table properties.