Hi! CSS

Hey there!
So I’m starting learning CSS. I’m at the very 1st part
What does .main p really do?

It’s a CSS selector choosing all paragraphs inside the “main” class.
P.S. I believe it is better to use quotation marks when referring to some part of your code. So What does “.main p” really do? should prevent misunderstanding.

1 Like

Oh, okay will do. Also thanks for the very informative answer

No problem. I am happy I had a chance to use my still very limited understanding of CSS and to be a bit helpful. :slight_smile:

Also it’s meaning is it will select the p in the “main” class for example:

p Hello I'm A Paragraph p
Right?

Let’s pretend it got closing and opening tags

<body>
  <div class="main">
    <p>I am the first paragraph.</p>
    <p>I am the second one.</p>
  <div>
 <div class="example">
    <p>I am the first paragraph.</p>
    <p>I am the second one.</p>
  <div>
</body>

In this example, your “.main p” selector will choose the first and the second paragraph in the first division but it does not choose the paragraphs in the second one.

1 Like

Understood. Thank you very much