Code has been added to clipboard!

The table HTML Tag

Reading time 2 min
Published Jun 29, 2017
Updated Oct 11, 2019

table HTML: Main Tips

Defining a Table in HTML

By using table HTML tags, you can include a table with rows and columns in the web page:

Example
<table>
  <tr>
    <th>Place</th>
    <th>Animal</th>
  </tr>
  <tr>
    <td>Space</td>
    <td>Dog</td>
  </tr>
</table>

To style your table, you can use CSS properties. If you don't, these values will be set by default:

Example
table { 
    display: table;
    border-color: gray;
    border-collapse: separate;
    border-spacing: 2px;
}
Udacity
Pros
  • Simplistic design (no unnecessary information)
  • High-quality courses (even the free ones)
  • Variety of features
Main Features
  • Nanodegree programs
  • Suitable for enterprises
  • Paid certificates of completion
Coursera
Pros
  • Professional service
  • Flexible timetables
  • A variety of features to choose from
Main Features
  • Professional certificates of completion
  • University-level courses
  • Multiple Online degree programs
Datacamp
Pros
  • Great user experience
  • Offers quality content
  • Very transparent with their pricing
Main Features
  • Free certificates of completion
  • Focused on data science skills
  • Flexible learning timetable

Deprecated HTML Table Attributes

The previously used HTML table attributes have been deprecated in HTML5. Get familiar with them, but don't use them in your codes:

Attribute Purpose Alternative
align Defined the table alignment in relation to the surrounding text CSS float
width Defined the table width CSS width
border Set the table border CSS border
cellpadding Defined the cell content and the cell wall CSS padding
cellspacing Defined the space between cells
frame Defined what should be visible outside the borders
rules Defined what should be visible inside the borders CSS border
summary Defined a summary for a table
bgcolor Specified the background color for a table CSS background-color

Browser support

Browser image
Chrome
1+
Browser image
Edge
All
Browser image
Firefox
1+
Browser image
IE
All
Browser image
Opera
All
Browser image
Safari
All

Mobile browser support

Browser image
Chrome
18+
Browser image
Firefox
4+
Browser image
Opera
All
Browser image
Safari
All

Latest Udacity Coupon Found:

Verified STAFF PICK

75% OFF COURSES

Udacity Black Friday Offer

The best time to save on Udacity courses is now - follow this coupon to access a 75% Udacity Black Friday discount & enjoy learning at a very low cost!

Expiration date: 30/11/2020
3176 People Used
Only 97 Left
Rating
5.0