do you see how the first selector of h1,h2,p is so neatly written?
There is an empty line before it and an empty line after the last } brace?
Please make your code lookd neat.
Make sure you put the styles on a separate line ( do not smush them with the selector).
Once you are done organizing, please re-post the code for another review if you cannot see where you went wrong (sometimes when we tidy things up, the mistakes reveal themselves)
In this case margin-left and margin-right are not elements in your index.html code.
(correct?)
So they cannot be selected by the browser.
Instead you want to define them as style properties inside the div block.
so add them like this: margin-left: auto; inside the div block (same for the margin-right)