Jump to content

Search the Community

Showing results for tags 'tbody'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Adrian Bahmani

  • Quotations
    • Quotes
  • Programming
    • HTML Tutorial
    • JavaScript Tutorial
  • Rarmer
    • Articles
    • Mudras
    • Meditation
    • Yoga Poses
    • Yoga Breathing

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Found 1 result

  1. HTML Table HTML table tag is used to display data in tabular form (row * column). There can be many columns in a row. We can create a table to display data in tabular form, using <table> element, with the help of <tr> , <td>, and <th> elements. In Each table, table row is defined by <tr> tag, table header is defined by <th>, and table data is defined by <td> tags. HTML tables are used to manage the layout of the page e.g. header section, navigation bar, body content, footer section etc. But it is recommended to use div tag over table to manage the layout of the page . HTML Table Tags توضیحات نام تگ یک جدول تعریف می کند <table> یک سطر جدید در جدول تعریف می کند <tr> یک سلول سرآیند در جدول تعریف می کند <th> یک سلول در جدول تعریف می کند <td> یک عنوان برای جدول تعریف می کند <caption> یک یا چند ستون را برای قالب بندی در جدول گروه بندی می کند <colgroup> همراه با عنصر <colgroup> استفاده می شود تا ویژگی های هر ستون را تعیین کند <col> محتوای بدنه جدول را گروه بندی می کند <tbody> محتوای سرآیند جدول را گروه بندی می کند <thead> محتوای پانویس جدول را گروه بندی می کند <tfooter> Tag Description <table> It defines a table. <tr> It defines a row in a table. <th> It defines a header cell in a table. <td> It defines a cell in a table. <caption> It defines the table caption. <colgroup> It specifies a group of one or more columns in a table for formatting. <col> It is used with <colgroup> element to specify column properties for each column. <tbody> It is used to group the body content in a table. <thead> It is used to group the header content in a table. <tfooter> It is used to group the footer content in a table. HTML Table Example Let's see the example of HTML table tag. It output is shown above. <table> <tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr> <tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr> <tr><td>James</td><td>William</td><td>80</td></tr> <tr><td>Swati</td><td>Sironi</td><td>82</td></tr> <tr><td>Chetna</td><td>Singh</td><td>72</td></tr> </table> Output: First_Name Last_Name Marks Sonoo Jaiswal ۶۰ James William ۸۰ Swati Sironi ۸۲ Chetna Singh ۷۲ In the above html table, there are 5 rows and 3 columns = 5 * 3 = 15 values. HTML Table with Border There are two ways to specify border for HTML tables. By border attribute of table in HTML By border property in CSS 1) HTML Border attribute You can use border attribute of table tag in HTML to specify border. But it is not recommended now. <table border="1"> <tr><th>First_Name</th><th>Last_Name</th><th>Marks</th></tr> <tr><td>Sonoo</td><td>Jaiswal</td><td>60</td></tr> <tr><td>James</td><td>William</td><td>80</td></tr> <tr><td>Swati</td><td>Sironi</td><td>82</td></tr> <tr><td>Chetna</td><td>Singh</td><td>72</td></tr> </table> 2) CSS Border property It is now recommended to use border property of CSS to specify border in table. <style> table, th, td { border: 1px solid black; } </style> You can collapse all the borders in one border by border-collapse property. It will collapse the border into one. <style> table, th, td { border: 2px solid black; border-collapse: collapse; } </style>
×
×
  • Create New...