Do i enter the code inside the .body or use * selector?


Learn HTML & CSS: Part I
Resetting Defaults

No error Just confirming if I should write the code inside the .body element or should i write it above first line using the * selector.
I tried both I don't notice a difference in the page styling.

It said to write it in body so i just added it 

.body {
  background-color: #FFF;
  font-family: 'Raleway', sans-serif;
  margin: 0;
  padding: 0;

or should I have written up top 

* {
  margin: 0;
  padding: 0;


If you apply the reset to the body element only, it will not affect lists, definition lists, or blockquotes or paragraphs. If you apply it with the universal selector every node gets reset.


thank you that made sense


Also, body is used as body { and not .body{


oops thanks for pointing that out


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.