FAQ: Setup and Syntax - Intro to CSS

This community-built FAQ covers the “Intro to CSS” exercise from the lesson “Setup and Syntax”.

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

Full-Stack Engineer
Front-End Engineer
Back-End Engineer

FAQs on the exercise Intro to CSS

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

Ask or answer a question about this exercise by clicking reply (reply) below!
You can also find further discussion and get answers to your questions over in #get-help.

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

Need broader help or resources? Head to #get-help and #community:tips-and-resources. If you are wanting feedback or inspiration for a project, check out #project.

Looking for motivation to keep learning? Join our wider discussions in #community

Learn more about how to use this guide.

Found a bug? Report it online, or post in #community:Codecademy-Bug-Reporting

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!

Hello everybody!

I have a question, I just finished Semantic HTML lesson where I learned how important/good practice is to use semantic tags, but the next Intro to CSS all I see is

's with a class. Why is it done like that?

1 Like

Hi @phantom78

Could you give an example as to what you’re trying to explain?

I need a little clarification before I try and answer your question.

So I was taking a look at the stylesheet for this intro to CSS and I noticed something unfamiliar to me. I understand that the margin and padding below are being targeted by the (html > body) selectors respectively.

What I don’t understand is why (font-family & font-weight) is being included in a separate body selector on their own? Why not include it (font-family & font-weight) within the same (html > body) selectors shown below?

html, body {
margin: 0;
padding: 0;

body {
font-family: ‘Roboto’, sans-serif;
font-weight: 100;

Hi @fermn,
Many thanks for your reply, I noticed that my question isn’t as I tried to write it. I was asking about div 's and semantic.
here is a bit of code from the NY City Blog that we worked on at the end of Semantic HTML lesson:

[codebyte html]

New York City


[/codebyte html]
As you can see, we are using header, main, section etc. but the very next lesson about CSS, the code looks like this:

[codebyte html]

A city in the midst of reinventing itself and continuing to build on the... [/codebyte html] And there's no semantic html code at all (or hardly any, can't remember), everything is only with div 's.

So that’s what is confusing for me.

uf, I see I’m still struggling to copy the code, I thought codebyte is the way.

I know it is too late. Can you add the screenshot for the same?

Hi @phantom78, I just finished the Learn HTML course and decided to start the Learn CSS course next and had the exact same question also, on why everything is structured with div’s ?
Thanks for bringing that up, I realize it’s not imperative to this first lesson of Learn CSS but just thought I’d let you know that the question immediately crossed my mind as well. Thanks!

1 Like

I have the same question.

When you start with this lesson: Intro to CSS. The code in the example is this one.

<div class="nav">...</div>

<div class="main">...</div>

shouldn’t it be used the header tag, nav tag inside the header, and so on?
and then add a div in order to style the container?

1 Like

Hi everyone,

The same thing happened to me. After reading 2 articles about the importance of semantic HTML for the Front-End Engineer course, we jumped on to CSS and all I see is <div> everywhere… WTF?!

I understand they have different people to create the exercises, but please put someone to revise the code for the course because not even the indentation is consistent for all the exercises. Also, sometimes one exercise explains something but the following exercise contradicts the previous one.

Please, fix those issues because for someone who just start learning web development makes it more confusing than what already is; and we are paying for this

Thank you,