Hey ammejohn10, you can use the below listed code for the same:

<table>
<thead>
<tr>
<th>Name</th>
<th>ID</th>
<th>Favorite Color</th>
</tr>
</thead>
<tbody>
<tr>
<td>Jim</td>
<td>00001</td>
<td>Blue</td>
</tr>

    dalecosp;11048817 wrote:

    CSS stands for Cascading Style Sheets. As such, they are perfect for determining what some content will look like, where it might sit on a page, etc.

    But CSS is NOT content, doesn't contain content (background-image, perhaps, excepted) and can't be used, per se, to create content. That's what Markup Languages are for ... the most widely known of which is HTML, and used to make all kinds of pages on the WWW.

    But sometimes I saw that many people use css to creating table for contain some details like name, address, phone no, ID etc. Can you define in CSS we use html code or CSS coding is different for creating table?

      lilysmith22;11048845 wrote:

      Hey ammejohn10, you can use the below listed code for the same:

      <table>
      <thead>
      <tr>
      <th>Name</th>
      <th>ID</th>
      <th>Favorite Color</th>
      </tr>
      </thead>
      <tbody>
      <tr>
      <td>Jim</td>
      <td>00001</td>
      <td>Blue</td>
      </tr>

      Thanks lily, But I already used this code in simple HTML and here am asking about CSS.

        You cannot create tables in CSS (multicolumn layout notwithstanding as it's not REALLY a table). CSS is only used to style (what the second S in CSS stands for) or decorate a table that was created through some other means - namely, with HTML.

        You can use CSS to make your tables look really good, but you cannot create them with pure CSS. That is not what it is for.

          clueless, as you might note, you created the 'table' content with HTML and used CSS for appearance ... so we have to keep harping on the truth here 😉

            Bonesnap;11048863 wrote:

            You cannot create tables in CSS (multicolumn layout notwithstanding as it's not REALLY a table). CSS is only used to style (what the second S in CSS stands for) or decorate a table that was created through some other means - namely, with HTML.

            You can use CSS to make your tables look really good, but you cannot create them with pure CSS. That is not what it is for.

            OK, as per you CSS is not a markup language. It's just a plain text file that use to describe the looks and format of your document or webpages.

              dalecosp;11048867 wrote:

              clueless, as you might note, you created the 'table' content with HTML and used CSS for appearance ... so we have to keep harping on the truth here 😉

              Very true, but it seemed a fun idea to try

                Hello guys, Still I couldn't get proper solutions. [ATTACH]5221[/ATTACH] am sending this snapshot, like this I want to create table. But I don't want to my code section become more lengthy so what will be the exact code to create table?

                table_football_rows.gif

                  How is your data been delivered? I mean is it from a database?

                    cluelessPHP;11049095 wrote:

                    How is your data been delivered? I mean is it from a database?

                    No, It's just a html code, where I put all data manually using <table>, <tr> etc tags. But yes, I need to fetch all data from my database. By all these process my code section becoming more larger, what should I do?

                      8 days later

                      Use a table, it only requires two table rows when using the correct sql querie

                        5 days later
                        ammejohn10;11049113 wrote:

                        No, It's just a html code, where I put all data manually using <table>, <tr> etc tags. But yes, I need to fetch all data from my database. By all these process my code section becoming more larger, what should I do?

                        Yeah that tends to happen. The more data you want to display, the more HTML is required.

                        If you really think about it, if all someone wants is the data, you could just send them a spreadsheet or the database or something. Obviously, HTML and CSS exist for formatting stuff. There is a fundamental difference between HTML and CSS. HTML is the content you want to show, with some structure added to it. The point of using HTML markup like this:

                        <TABLE><TR><TD>your-data-goes-here</TD></TR></TABLE>

                        Is to tell the web browser of your visitor that you intend for the data to be displayed as a table. So HTML is partly your actual data and partly layout.

                        CSS doesn't contain your data at all. It is essentially incapable of doing so. CSS is there to set fonts, colors, margins, borders, text styling, etc.

                          Write a Reply...