Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6804757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:30:19+00:00 2026-05-26T19:30:19+00:00

I have two questions regarding to html table layout. First I will provide some

  • 0

I have two questions regarding to html table layout.

First I will provide some background I am designing a django web application as part of it I am laying out a list of cards that a user has on file in a table. I want bellow this to be a button allowing the user to add a card – Should this element be inside a final table row or should it just be after the table? I am merely asking to find what is the common/standard way of doing things.

Secondly, I later want to stylize the table so that each table row (or card) has its own layout probably something like this

************************
Card Name
***********************
Number:#####      Date:#####
other details blah, blah, blah
Manage Buttons (Edit/Delete/Etc..)
***********************

This is all tabular data but I am unsure if it should still be in a table or if it should be in custom views.

Here is my current django template

{% include "base.html" %}
<p>Credit Cards</p>
{% if credit_cards %}
    <table border="1">
        <tr>
            <th>Name On Card</th>
            <th>Card Number</th>
        <th>Contact Number On Card</th>
        <th>Lost Button</th>
        <th>Edit</th>
        <th>Delete</th>
    </tr>
    {% for card in credit_cards %}
    <tr>
        <td>{{ card.name_on_card }}</td>
        <td>{{ card.card_number }}</td>
        <td>{{ card.contact_number_on_card }}</td>
        <td>
            <form action="" method="post"> {% csrf_token %}
                {% if card.is_lost %}
                    <p><input type="submit" value="I Found My Card"></p>
                {% else %}
                    <p><input type="submit" value="I Lost My Card"></p>
                {% endif %}
            </form>
        </td>
        <td>
            <form action="" method="post"> {% csrf_token %}
                <p><input type="submit" value="Edit"></p>
            </form>
        </td>
        <td>
            <form action="" method="post"> {% csrf_token %}
                <p><input type="submit" value="Delete"></p>
            </form>
        </td>
    </tr>
    {% endfor %}
    <tr><td colspan="6">Test</td></tr>
</table>
{% else %}
<p>No Credit Cards inserted yet.</p>
{% endif %}
<hr>
<p>ID Cards</p>
{% if id_cards %}
<table border="1">
    <tr>
        <th>Name On Card</th>
        <th>Card Number</th>
        <th>Issue Date</th>
        <th>Country</th>
        <th>Address</th>
    </tr>
    {% for card in id_cards %}
    <tr>
        <td>{{ card.name_on_card }}</td>
        <td>{{ card.card_number }}</td>
        <td>{{ card.issue_date }}</td>
        <td>{{ card.country }}</td>
        <td>{{ card.address }}</td>
    </tr>
    {% endfor %}
</table>    
{% else %}
    <p>No ID Cards inserted yet.</p>
 {% endif %}

<ul>
<li><a href="{% url crds_newCredit %}">Add Credit Card</a></li>
<li><a href="{% url crds_newID %}">Add ID Card</a></li>
</ul>

This is still very rough but you can probably get the general idea.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:30:19+00:00Added an answer on May 26, 2026 at 7:30 pm

    Its usually best to keep the button outside of the table as, semantically speaking, the button is operating on the table and therefore should be a separate element all to it’s own.

    In terms of displaying the card view, that’s a personal preference and I would probably try divs as I wouldn’t want to be iteratively creating hundreds or thousands of nested tables.. on the other hand and, again semantically speaking, tabular data should always be in tables.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two questions regarding Java web application deployment and its impact on performance.
I actually have two questions regarding the same problem but I think it is
I actually have two questions regarding exception/error handling in the iPhone app that I
I have two questions regarding the multidimensional arrays. I declared a 3D array using
I have two questions regarding ceil() function.. The ceil() function is implemented in C.
I have two questions regarding python libraries: I would like to know if there
I have two questions regarding binary search trees, both about empty trees. Is an
I have two questions regarding the behavior of running the below code. Why is
I have two questions regarding a login form I'm styling. I am using onfocus
It's actually two part question regarding my simple page (that will be replaced some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.