You must Sign In to post a response.
  • Category: Programming

    Provide the html code for adding the table.

    Learning HTML code? Searching for code to add table? Find responses from experts on this page.

    Can you provide the table tag which is used in the webpage? Can you provide the tag in the MS document page?
    Awaiting response.
  • #136687
    You can add the HTML table into the page using table tag. You an also beautify the table using the inline CSS. You can use the color, border and few other margin attributes.

    1. tr tag defines the row in the table. In case of the td tag it gets you the tablet data.
    2. th tag defines the table heading. you can use it for the column headers of the table.
    3. So your table must contain these three tags. table tag for whole structure. tr tag for the table row and td tag for the table data.
    4. You can use images, text and links inside the tables.

    Check the sample table tag usage in pastebin link here:

    Now if you want to use CSS tables then you can use the CSS attributes for the same. You have to assign ID or class to the tablet. And then you can add the attributes to the table.

    You can learn more about it from codecademy or similar other websites. Search on google with title "HTML Tables" or "CSS Tables".

  • #136962
    Hello saket Raj,

    Some of the tags used to create a table in HTML are as follows.
    1) <table> : This tag is used to define a table.
    2) <tr> : This tag is used to add a row to the table.
    3) <td> : This tag is used to add data into a row of the table.
    4) <th> : This tag is used to add a table heading.
    5) <caption> : This tag is used to add a caption to a table.

    Sample Code
    <caption>Student Data</caption>

    Table corresponding to Sample Code
    Student Data
    Krishna Teja 59
    Venkat Reddy 25
    Prudhvi Nayak 17

    In addition to above mentioned tags, CSS (Cascading Style Sheets) tags can be used to draw borders etc,. Attributes like rowspan, colspan are used to specify the length of a row, length of a column respectively. Also, the attribute id can be used to define a unique table.

    Hope this answer helps.

  • #137625
    Hello saket Raj,

    Proving "table" by using HTML is very simple. We can also apply the CSS(Cascading Style Sheets) to the HTML code. A sample HTML table code of student details given below.

    Example Program:
    <table border="1px solid black">
    <th>Student Name</th>
    <th>Roll No</th>
    <td>saikishore Meda</td>
    <td>bharathb kumar</td>
    <td>krishna bharath</td>

    By above code a table will create.

    The tags which are used in the code have unique properties. Which are explained below.
    1. <table>- To define a table.("border" it is a property for making a outline for a table ).
    2. <tr> - It is used to define a row.
    3. <th> - It is used to define heading of a column.
    4. <td> - It is used to enter the data to a table.

    There are some style properties to look like as a pretty table. Try to refer a HTML styles for sizes of the columns rows.

    I hope this will helpful to you.

  • #137730
    We can add the tables using table tag like which provide the table for example
    we create the student details using table tag
    first off all we have to know the details about some tags
    :which provide the create of the table
    : this is used for the table row
    thead Groups the header content in a table
    tbody Groups the body content in a table
    tfoot Groups the footer content in a table

    !DOCTYPE html>

    HTML Tables

    :using this tag we can name to the heading
    :this is used for the enter the data

    Now we see one example how to create tables in HTML

    student details

  • #138119
  • name roll no gender
    75 Mahesh y13cs3221 male
    In order to display the data in the tabular form we can use tag.
    the following tags are used inside the table
    - creates table row
    - creates a table body when grouping rows
    - creates a table heading when grouping rows
    - create a table foot when grouping rows

    Example programme:

    _ creates table heading
    - above the table caption and name can be given

    John 101

  • #140039
    Tag Description
    table Defines a table
    th Defines a header cell in a table
    tr Defines a row in a table
    td Defines a cell in a table
    caption Defines a table caption
    colgroup Specifies a group of one or more columns in a table for formatting
    col Specifies column properties for each column within a

  • Row 1, Column 1Row 1, Column 2
    Row 2, Column 1Row 2, Column 2

    Saket Kumar
    Real Eyes Realize Real Lies.

  • #140166
    I HTML we can create the table by using the th and td
    Here is the sample code for using the html table
    In style tag we have the attributes written

    Name Class
    Mohan B.Tech
    Jenny M.Tech

  • #147904
    - Main Tag
    tr - It is used to define a row.
    th - It is used to define heading of a column.
    td - It is used to enter the data into a table.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.