FAQ: CSS Grid Essentials - Introduction to Grids

This community-built FAQ covers the “Introduction to Grids” exercise from the lesson “CSS Grid Essentials”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Learn CSS

FAQs on the exercise Introduction to Grids

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

1 Like

If anyone else is confused by what appears to be a missing Flexbox lesson, take a look at these 2 threads :wink:

Lessons on Flexbox?

Where is the Flexbox course?

3 Likes

Yup. I was confused about that. So I just started watching Flexbox tutorials on Youtube, and will now switch into the Web Development path to do the Flexbox material.

Thank for digging around!

1 Like

so is html “table” outdated now? where do we use “table” and where “css grid”?

<table>
   <tr>
     <td>A</td>
     <td>B</td>
   </tr>
</table>

From what I have discovered, the answer to this is ‘yes’ and ‘no’.

Waaaay back when, tables were just about the best thing we had for creating page layouts. I had a look at one of my old websites on the Wayback Machine the other day… it was all tables :blush: :smile:

Then we have had divs and positioning. Floats and all that. Now we have these here Grids and also Flexboxes in the CSS3 standard. And these two layout methods are being wrapped into a new part of the CSS standard called Box Alignment.

Anyway. Tables are still a part of CSS3. They are now considered a semantic part of the standard.

So, if you need to lay out a table of data… tables are still there and will give you semantic HTML, and so they certainly still have their uses.

2 Likes

And not sure on the ins and outs of using grids to display a table, but I found this post which lays out how to use flexbox to create responsive tables; in the comments there is a post asking why not use tables and just apply display: flex to them, making the child elements flexbox items, and thus retaining the semantic HTML of table elements.

That seems like a pretty cool idea, and I really love this responsive table (way better than other examples that I’ve seen).

In the same way… if using a grid would work… you could use the Table element and change it to display: grid and proceed in the same (semantic, but grid-powered) manner.

2 Likes