Harsh ShahRank #1,322 · 1.3K reputationPosted Nov 19, 2019, 5:20 PM EST
+1
Hi
element is a container for other html elements. Div defines section or a portioon in a web page. Whereas, Table is used to structure data into row and column.
Div element contain any other elements like p,h1-h6,article,section and table too. But table element can only contain tbody,tr,td elements which is only used to structure data into tabular form.
So these both the elements have there own perepective of usage. You can arrange your application data into tabular form with using div element instead of table element, but that will be usless when you have thousands of records in your database. so at that time you need to implement tabular sturcture using table element only because it will make easy for you to arrange your data in easy way.
so this is a very basic but essential explaination of your question.
Hope this will help you.
Thank you.
+1
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 11, 2019, 5:54 AM EST
Dipa MehtaRank #361 · 6.9K reputationPosted Nov 11, 2019, 7:14 AM EST
0
This is the best and easy to understand why we are now focusing on DIV instead of TABLE in HTML5
Kindly check once
https://www.slideshare.net/mobile/umarali1981/difference-between-div-and-table
0
Bidyasagar MishraRank #766 · 3K reputationPosted Nov 11, 2019, 11:42 PM EST
0
This is a common pattern for making responsive tables. Tabular data is tricky to display on mobiles since the page will either be zoomed in to read text, meaning tables go off the side of the page and the user has to scroll backwards and forwards to read the table, or the page will be zoomed out, usually meaning that the table is too small to be able to read.
Responsive tables change layout on smaller screens - sometimes some columns are hidden or columns are amalgamated, e.g. name and email address might be separate on large screens, but collapse down into one cell on small screens so the information is readable without having to scroll.
s are used to create the tables instead of
tags for a couple of reasons. If
tags are used then you need to override the browser default styles and layout before adding your own code, so in this case
tags save on a lot of boilerplate CSS. Additionally, older versions of IE don't allow you to override default table styles, so using
Syed ShanuRank #87 · 23.7K reputationPosted Jul 21, 2015, 7:02 PM EDT
Harsh ShahRank #1,322 · 1.3K reputationPosted Nov 19, 2019, 5:20 PM EST
Mageshwaran RRank #411 · 6.1K reputationPosted Nov 11, 2019, 5:54 AM EST
Dipa MehtaRank #361 · 6.9K reputationPosted Nov 11, 2019, 7:14 AM EST
Bidyasagar MishraRank #766 · 3K reputationPosted Nov 11, 2019, 11:42 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts