Sign in Registration
ruen

Creating tables in HTML, what are the tags and attributes

Creating tables on site pages is a fairly frequent process, so you need to know how to create them correctly. Tables allow you to present the material in an easy-to-read form, information from the tables is better remembered.

html-table-tags-atributes

There are special tags for creating tables in HTML - table, tr, th, td . This is the minimum set of tags needed to make almost any table. But there are other tags that you might need. Below is a complete list of such tags:

  • table - creates a table, available attributes: align, background, bgcolor, border, bordercolor, cellpadding, cellspacing, cols, frame, height, rules, summary, width ;
  • thead - designed to store one or more rows at the very top of the table, attributes: align, char, charoff, bgcolor, valign ;
  • tbody - designed to store one or more rows in the middle of the table, attributes: align, char, charoff, bgcolor, valign ;
  • tfoot - designed to store one or more rows at the very end of the table, attributes: align, char, charoff, bgcolor, valign ;
  • tr - serves as a container for creating a table row, attributes: align, bgcolor, bordercolor, char, charoff, valign ;
  • th - serves to create table headers, attributes: abbr, align, axis, background, bgcolor, bordercolor, char, charoff, colspan, headers, height, nowrap, rowspan, scope , valign, width ;
  • td - creates a table cell, attributes: abbr, align, axis, background, bgcolor, bordercolor, char, charoff, colspan, headers, height, nowrap, rowspan, scope, valign , width ;
  • caption - sets the table caption, attributes: align, valign ;
  • colgroup - designed to set the width and style of one or more table columns, attributes: align, char, charoff, span, valign, width ;
  • col - sets the width and other characteristics of one or several columns of the table, attributes: align, char, charoff, span, valign, width .

There are various ways to create tables in HTML using tags and the required attributes. Some of the attributes are recommended not to be used, but instead to resort to styling styles correctly with CSS Styles . Thanks to CSS, you can significantly change the appearance of the table, there are special properties for tables - both universal and specific.

Comments (0)
For commenting sign in or register.

Latest articles

Popular sections

Eqsash (Tools)

Android app - VK LAST USER ID, отучитель от зависимости и т.д.:
Available on Google Play

Amessage (Communication)

Login to the web version
Android app:
Available on Google Play

Share this

Subscribe to

YouTube

Books

IT notes - In simple language about the most necessary things (HTML, CSS, JavaScript, PHP, databases, Drupal, Bitrix, SEO, domains, security and more), PDF, 500 p.