Attribute of table in HTML | Code2night.com
Code2night
  • Home
  • Blogs
  • Guest Posts
  • Tutorial
  • Post Blog
  • Register
  • Login
  1. Home
  2. Blogpost

Attribute of table in HTML

Date- Dec 09,2023

1415

In HTML, the <table> tag is used to create tables to display data in a structured grid format. The <table> tag can contain several attributes that help in defining and customizing the behavior and appearance of the table. Here are some commonly used attributes of the <table> tag:

  1. 1. border:

    • The border attribute is used to set the border width around the table and its cells.
    • Example: <table border="1">
  2. 2. cellpadding:

    • The gap between the cell content and the cell border is specified by the cellpadding attribute.
    • Example: <table cellpadding="5">
  3. 3. cellspacing:

    • The cellspacing attribute specifies the space between table cells.
    • Example: <table cellspacing="5">
  4. 4. width:

    • The width attribute specifies the table's width.
    • Example: <table width="100%">
  5. 5. height:

    • The height attribute sets the height of the table.
    • Example: <table height="200">
  6. 6. align:

    • The align attribute aligns the table with respect to the surrounding content (left, center, right).
    • Example: <table align="center">
  7. 7. summary:

    • The summary attribute provides a brief description of the table's content for accessibility purposes.
    • Example: <table summary="Monthly sales data">
  8. 8. bordercolor:

    • The bordercolor attribute sets the color of the table border.
    • Example: <table bordercolor="#CCCCCC">
  9. 9. bgcolor:

    • The bgcolor attribute sets the background color of the table.
    • Example: <table bgcolor="#F5F5F5">

Please note that while these attributes can be used for basic formatting, it's generally recommended to use CSS (Cascading Style Sheets) for styling HTML elements, including tables. CSS provides more control and flexibility for formatting and styling tables, and it separates the design from the content, making it easier to maintain and customize the appearance of the table.




Comments

Tags

LinkedinLogin
LinkedinProfile
GetLinkedinProfile
C#
Aspnet
MVC
Linkedin
ITextSharp
Export to Pdf
AspNet Core
AspNet
View to Pdf in Aspnet
Model Validation In ASPNET Core MVC 60
Model Validation
Model Validation In ASPNET Core MVC
Model Validation In ASPNET
Image Compression in AspNet
Compress Image in c#
AspNet MVC
Free Download for Youtube Subscribers!

First click on Subscribe Now and then subscribe the channel and come back here.
Then Click on "Verify and Download" button for download link

Subscribe Now | 1210
Download
Support Us....!

Please Subscribe to support us

Thank you for Downloading....!

Please Subscribe to support us

Continue with Downloading
Be a Member
Join Us On Whatsapp Join Us On Facebook

Welcome To Code2night, A common place for sharing your programming knowledge,Blogs and Videos

  • Panipat
  • info@Code2night.com

Links

  • Home
  • Blogs
  • Tutorial
  • Post Blog

Popular Tags

Copyright © 2025 by Code2night. All Rights Reserved

  • Home
  • Blog
  • Login
  • SignUp
  • Contact
  • Terms & Conditions
  • Refund Policy
  • About Us
  • Privacy Policy
  • Json Beautifier
  • Guest Posts