FAQ: Learn HTML - Tables - Styling with CSS

This community-built FAQ covers the “Styling with CSS” exercise in Codecademy’s lessons on HTML.

Here are the most popular community questions on this exercise:

Join the Discussion. We Want to Hear From You!

Have a new question or can answer someone else’s? Reply (reply) to an existing thread!

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

Need broader help or resources about HTML in general? Go here!

Want to take the conversation in a totally different direction? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

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

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

Other FAQs

The following are links to additional questions that our community has asked about this exercise:

  • This list will contain other frequently asked questions that aren’t quite as popular as the ones above.
  • Currently there have not been enough questions asked and answered about this exercise to populate this FAQ section.
  • This FAQ is built and maintained by you, the Codecademy community – help yourself and other learners like you by contributing!

Not seeing your question? It may still have been asked before – try searching for it by clicking the spyglass icon (search) in the top-right of this page. Still can’t find it? Ask it below by hitting the reply button below this post (reply).

2 posts were split to a new topic: Where do I need to add in the 18 pixel change? [solved]

4 posts were merged into an existing topic: Where do I need to add in the 18 pixel change? [solved]

3 posts were split to a new topic: Should I have learned CSS before this lesson?

A post was split to a new topic: Bug in lesson [unreproducible]

I still can not figure out how to change the size of the font.

In style.css , change the font size of all table headings and table data to 18 pixels.

When I tried to look at the solution, I saw no difference between the original and the solved version. Can anyone show me or explain better please?

5 Likes

Hi, I’ve been learning along with Codeacademy so please take anything I have to say with a grain of salt. Since there doesn’t appear to be any responses for you, I’ll try and help. By analysing other sections of the style.css file, I noticed there is information for font size as “font-size:16px;” for li.
I added this information to the “th, td” section and inputted the font size as 18px.

It worked so yeah.

2 Likes

Hi
Can you please tell me where I change the font size to 18 px? I tried, but at the bottom of screen it says Did you change the font size? I dont know where to do it?
Thanks for the help

3 Likes

You have to manually add font-size:

th, td {
  font-family: 'Lato', sans-serif;
  font-weight: 400;
  font-size: 18px;
  padding: 20px;
  text-align: left;
  width: 33.3333%;
}
2 Likes

Hey,
Can anyone explain what is the difference between the solved problem code and the one we have to work with. Cause I can’t find any

The given tow have would have any difference in writing the code? Why would someone prefer one style than the other besides being personal choice?

table, th, td
{
border: 1px solid black;
font-family: Arial, sans-serif;
text-align: center;
}

table, th, td {
border: 1px solid black;
font-family: Arial, sans-serif;
text-align: center;
}

The given tow have would have any difference in writing the code? Why would someone prefer one style than the other besides being personal choice?

table, th, td
{
border: 1px solid black;
font-family: Arial, sans-serif;
text-align: center;
}

table, th, td {
border: 1px solid black;
font-family: Arial, sans-serif;
text-align: center;
}

In the lesson HTML Tables: Styling with CSS, module 12. I had to ask for the solution because I had no clue where to go or what to do. PLEASE HELP!

Welcome to the forums!

Head to the file named style.css (look at the tabs at the top of the code editor window in the middle). There, look for the attribute of th and td that is named font-size and set it to the value 18px.

1 Like

Thanks so much! Got it!

1 Like

How does the html file pull the formats (fonts size etc.) out of the styles.css? I do not find a kind of linkage within the html file that connects it to the styles.css

The answer is:

th, td { font-size: 18px; }

There was no attribute named font-size! I had to add it myself!

Just tested this out and you’re right. Interesting, it was there when I completed the course a few months ago.