Home>Article>Web Front-end> What is the difference between grid layout and table in css

What is the difference between grid layout and table in css

王林
王林 Original
2020-11-13 09:28:05 4462browse

The difference between grid layout and table in css is: 1. Grid is implemented in css, and table is implemented in html; 2. Grid is of fixed size, and table is of variable size; 3. , grid inherits from panel element, and table inherits from block element.

What is the difference between grid layout and table in css

Grid layout (Grid) is the most powerful CSS layout solution.

It divides web pages into grids, and you can combine different grids to create various layouts. Effects that were previously only possible through complex CSS frameworks are now built into browsers.

(Learning video recommendation:css video tutorial)

CSS Grid layout consists of two core components: wrapper (parent element) and items (child elements). The wrapper is the actual grid, and the items are the contents of the grid.

The difference between grid layout and table is as follows:

1. Grid is implemented in CSS, while table is implemented in HTML, and most importantly, grid seems to be only available in IE10 browser It is supported, but other browsers do not support it

2. The grid is of fixed size, and the table size is variable

3. The grid inherits from the panel element, and the table inherits from the block element

Related recommendations:CSS tutorial

The above is the detailed content of What is the difference between grid layout and table in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn