Angular5 Remove Default Padding


I have started a default Angular 5 CLI app…

ng new testApp

I then changed the background app.component.html to gray so you can see my issue…

<div style="text-align:center; background:gray">

The default app always has these unnecessary gaps (margins? padding?) between the browser’s edge and the first level of content (container?). What is the easiest, most direct way to remove these gaps completely? There should be a single value I can change somewhere to fix this, right?

enter image description here


This space is the margin of the body and the margin of

<h1> Welcome to app! </h1>

Answered By – One Qode

Answer Checked By – Terry (AngularFixing Volunteer)

Leave a Reply

Your email address will not be published.