tbody tag align attribute in HTML


Definition: The tbody tag align attribute is used to align the main content of the table in horizontal direction.


Syntax:


List of expected values of tbody tag align attribute

Sr. No.valueDescription
1leftleft aign the main content of table.
2rightright aign the main content of table.
3centercenter aign the main content of table.
4justifyjustify the main content of table.
5charaign the main content to a specific character.

use attribute value align=”left” in tbody

Left align the main content using align=”left” in tbody part of the table.

Output

Keyboard shortcuts:

Sr. No.name
1Ctrl+S: To save the file.
2Ctrl+V: To save the content.
3Ctrl+C: To copy the content.

use attribute value align=”right” in tbody

Right align the main content using align=”right” in tbody part of the table.

Output

Computer network terms:

Sr. No.name
1Local Area Network
2Wide Area Network
3Cisco Certified Network Association

use attribute value align=”center” in tbody

Center align the main content using align=”center” in tbody part of the table.

Output

Computer hardware devices:

Sr. No.name
1Monitor
2Keyboard
3Printer

use attribute value align=”justify” in tbody

Justify the main content using align=”justify” in tbody part of the table.

Output

Shoes branded companies:

Sr. No.name
1Reebok
2Red & Chief
3Woodland

use attribute value align=”char” in tbody

Align the main content to a specific character using align=”justify” in tbody part of the table.

Note: char attribute is not supported with any major browsers.

Output

Best Indian Cities:

Sr. No.name
1Delhi
2Mumbai
3Chennai

Resources and References

  1. W3C Specification.
  2. W3C project using Github.
  3. W3 resource.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.